/*
 * MarketLens Premium — UI Enhancement Layer
 * Scoped to .analysis-suite--marketlens for zero side-effects.
 */
@layer premium {
  .analysis-suite--marketlens {
    --ml-bg: #f4f7f5;
    --ml-surface: #ffffff;
    --ml-surface-hover: #fafbfa;
    --ml-border: rgba(16,42,46,0.08);
    --ml-border-hover: rgba(16,42,46,0.18);
    --ml-text: #102a2e;
    --ml-text-soft: #5a7174;
    --ml-text-muted: #8b9ca0;
    --ml-shadow-sm: 0 1px 3px rgba(11,45,53,0.04), 0 1px 2px rgba(11,45,53,0.06);
    --ml-shadow-md: 0 4px 16px rgba(11,45,53,0.07), 0 2px 6px rgba(11,45,53,0.04);
    --ml-shadow-lg: 0 8px 32px rgba(11,45,53,0.09), 0 3px 10px rgba(11,45,53,0.05);
    --ml-shadow-xl: 0 16px 48px rgba(11,45,53,0.12);
    --ml-radius-sm: 10px;
    --ml-radius-md: 14px;
    --ml-radius-lg: 18px;
    --ml-radius-xl: 22px;
    --ml-teal: #118b76;
    --ml-teal-light: rgba(17,139,118,0.1);
    --ml-navy: #0b2d35;
    --ml-transition: 0.25s cubic-bezier(0.4,0,0.2,1);
  }

  @media (prefers-color-scheme: dark) {
    .analysis-suite--marketlens {
      --ml-bg: #0a1a1e;
      --ml-surface: #122126;
      --ml-surface-hover: #162a30;
      --ml-border: rgba(255,255,255,0.07);
      --ml-border-hover: rgba(255,255,255,0.14);
      --ml-text: #e6edef;
      --ml-text-soft: #8fa6ab;
      --ml-text-muted: #61797e;
      --ml-shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
      --ml-shadow-md: 0 4px 16px rgba(0,0,0,0.35);
      --ml-shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
      --ml-shadow-xl: 0 16px 48px rgba(0,0,0,0.5);
    }
  }

  /* ---------- Card Overhaul ---------- */
  .analysis-suite--marketlens .card.border-0.shadow-sm {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border) !important;
    border-radius: var(--ml-radius-md);
    box-shadow: var(--ml-shadow-sm);
    transition: var(--ml-transition);
  }

  .analysis-suite--marketlens .card.border-0.shadow-sm:hover {
    border-color: var(--ml-border-hover) !important;
    box-shadow: var(--ml-shadow-md);
  }

  .analysis-suite--marketlens .card-header {
    padding: 1rem 1.25rem;
    background: var(--ml-surface);
    border-bottom: 1px solid var(--ml-border);
    border-radius: var(--ml-radius-md) var(--ml-radius-md) 0 0 !important;
  }

  .analysis-suite--marketlens .card-header h5,
  .analysis-suite--marketlens .card-header .h5 {
    font-size: 0.85rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--ml-text);
  }

  .analysis-suite--marketlens .card-body {
    padding: 1.15rem 1.25rem;
  }

  .analysis-suite--marketlens .card-header.bg-white {
    background: var(--ml-surface) !important;
  }

  .analysis-suite--marketlens .card-header.bg-success,
  .analysis-suite--marketlens .card-header.bg-danger,
  .analysis-suite--marketlens .card-header.bg-warning,
  .analysis-suite--marketlens .card-header[class*="bg-"] {
    padding: 0.85rem 1.25rem;
    border-bottom: 0;
  }

  .analysis-suite--marketlens .card-header[class*="bg-"] h5 {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
  }

  /* ---------- Accent Bar Refinement ---------- */
  .analysis-suite--marketlens .accent-bar {
    width: 3px;
    height: 16px;
    background: var(--ml-teal);
    border-radius: 3px;
    margin-right: 10px;
    flex-shrink: 0;
  }

  .analysis-suite--marketlens .card-title {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--ml-border) !important;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 650;
  }

  .analysis-suite--marketlens .card-title i {
    margin-right: 8px;
  }

  /* ---------- Dashboard Container ---------- */
  .analysis-suite--marketlens .dashboard-container {
    padding-top: 1rem;
  }

  .analysis-suite--marketlens .dashboard-container > .d-flex:first-child {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border) !important;
    border-radius: var(--ml-radius-md);
    padding: 1rem 1.25rem;
  }

  .analysis-suite--marketlens .dashboard-container > .d-flex:first-child h2 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .analysis-suite--marketlens .dashboard-container > .d-flex:first-child h2 i {
    font-size: 1.2rem;
  }

  .analysis-suite--marketlens .btn-group .btn-primary.dropdown-toggle {
    border-radius: 999px !important;
    padding: 0.5rem 1.1rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--ml-navy);
    border: 0;
  }

  .analysis-suite--marketlens .btn-group .btn-primary.dropdown-toggle:hover {
    background: var(--ml-teal);
  }

  /* ---------- Market Summary Strip Premium ---------- */
  .analysis-suite--marketlens .market-summary-strip {
    border-radius: var(--ml-radius-md) !important;
    background: linear-gradient(125deg, var(--ml-navy) 0%, #0d3a3d 35%, #155c54 70%, #118b76 100%) !important;
    box-shadow: 0 8px 32px rgba(11,45,53,0.18) !important;
    position: relative;
    overflow: hidden;
  }

  .analysis-suite--marketlens .market-summary-strip::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.04) 60%, transparent 80%);
    pointer-events: none;
  }

  .analysis-suite--marketlens .market-summary-strip .current-price-strip {
    font-size: 1.6rem !important;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff;
  }

  .analysis-suite--marketlens .market-summary-strip .current-volume-strip {
    color: rgba(255,255,255,0.92);
    font-size: 0.95rem;
  }

  .analysis-suite--marketlens .market-summary-strip .status-strip {
    color: rgba(255,255,255,0.95);
    font-weight: 650;
  }

  .analysis-suite--marketlens .price-thermometer {
    height: 5px;
    border-radius: 99px;
    background: linear-gradient(90deg, #198754 0%, #ffc107 50%, #dc3545 100%);
  }

  .analysis-suite--marketlens .price-thermometer .price-marker {
    width: 10px;
    height: 16px;
    background: #fff;
    border: 2px solid var(--ml-navy);
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    top: -6px;
  }

  .analysis-suite--marketlens .price-thermometer .price-marker::after {
    display: none;
  }

  /* ---------- Premium Badge Refinements ---------- */
  .analysis-suite--marketlens .badge.fs-4, 
  .analysis-suite--marketlens .badge.fs-5, 
  .analysis-suite--marketlens .badge.fs-6 {
    font-weight: 650;
    letter-spacing: 0.02em;
  }

  .analysis-suite--marketlens .badge.rounded-pill {
    padding: 0.35em 0.85em;
  }

  .analysis-suite--marketlens .card-trade-setup .card-header {
    border-radius: var(--ml-radius-md) var(--ml-radius-md) 0 0 !important;
  }

  .analysis-suite--marketlens .card-trade-setup .rating-pill {
    font-size: 0.75rem;
    font-weight: 600;
  }

  .analysis-suite--marketlens .badge.bg-success-subtle,
  .analysis-suite--marketlens .badge.bg-danger-subtle,
  .analysis-suite--marketlens .badge.bg-info-subtle,
  .analysis-suite--marketlens .badge.bg-warning-subtle {
    font-weight: 600;
    font-size: 0.7rem;
  }

  /* ---------- Price Ladder Premium ---------- */
  .analysis-suite--marketlens .ladder-container {
    height: 160px !important;
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
    border-radius: var(--ml-radius-sm);
    padding: 8px 12px;
    position: relative;
  }

  .analysis-suite--marketlens .ladder-line .badge {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.25em 0.5em;
    border-radius: 4px;
  }

  .analysis-suite--marketlens .ladder-line hr {
    opacity: 0.35;
  }

  /* ---------- Signal Strength Premium ---------- */
  .analysis-suite--marketlens .confluence-score {
    background: var(--ml-surface-hover) !important;
    border: 1px solid var(--ml-border);
    border-radius: var(--ml-radius-sm);
    padding: 0.75rem 1rem !important;
  }

  .analysis-suite--marketlens .confluence-track {
    height: 10px !important;
    border-radius: 99px !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    background: var(--ml-border) !important;
  }

  .analysis-suite--marketlens .mini-indicator-card {
    border: 1px solid var(--ml-border);
    border-radius: var(--ml-radius-sm);
    padding: 0.6rem 0.35rem !important;
    transition: var(--ml-transition);
    background: var(--ml-surface);
  }

  .analysis-suite--marketlens .mini-indicator-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ml-shadow-md);
    border-color: var(--ml-border-hover);
  }

  .analysis-suite--marketlens .mini-indicator-card .fs-6 {
    font-size: 0.95rem !important;
    font-weight: 700;
  }

  .analysis-suite--marketlens .mini-indicator-card .badge {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.2em 0.55em;
  }

  /* ---------- Signal Diagnostics Premium ---------- */
  .analysis-suite--marketlens .bg-light {
    background: var(--ml-surface-hover) !important;
  }

  .analysis-suite--marketlens .progress {
    background: var(--ml-border);
    border-radius: 99px;
    overflow: hidden;
  }

  .analysis-suite--marketlens .progress-bar {
    transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
  }

  /* ---------- Risk-Reward Premium ---------- */
  .analysis-suite--marketlens .risk-reward-track {
    height: 12px !important;
    border-radius: 99px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  }

  .analysis-suite--marketlens .price-thermometer .position-absolute > div:only-child {
    transition: left 0.4s cubic-bezier(0.4,0,0.2,1);
  }

  .analysis-suite--marketlens .alert-light {
    background: var(--ml-surface-hover);
    border: 1px solid var(--ml-border) !important;
    color: var(--ml-text-soft);
  }

  /* ---------- Alasan Rekomendasi ---------- */
  .analysis-suite--marketlens .bg-light-subtle {
    background: var(--ml-surface-hover) !important;
  }

  .analysis-suite--marketlens .card-body .border-top,
  .analysis-suite--marketlens .card-body .border-bottom {
    border-color: var(--ml-border) !important;
  }

  /* ---------- Advanced Insights Premium ---------- */
  .analysis-suite--marketlens .advanced-insights-card .card-header {
    border-radius: var(--ml-radius-md) var(--ml-radius-md) 0 0;
  }

  .analysis-suite--marketlens .advanced-insight-section {
    background: var(--ml-surface) !important;
    border: 1px solid var(--ml-border);
    border-radius: var(--ml-radius-sm) !important;
    transition: var(--ml-transition);
  }

  .analysis-suite--marketlens .advanced-insight-section:hover {
    box-shadow: var(--ml-shadow-md);
    border-color: var(--ml-border-hover);
  }

  .analysis-suite--marketlens .advanced-insight-section .lead {
    color: var(--ml-text-soft);
  }

  .analysis-suite--marketlens .advanced-insight-section ul li {
    border-radius: 8px;
    transition: var(--ml-transition);
  }

  .analysis-suite--marketlens .advanced-insight-section ul li:hover {
    transform: translateX(2px);
  }

  /* ---------- Confluence Bar Premium ---------- */
  .analysis-suite--marketlens .confluence-bar {
    padding: 0.75rem 1rem;
    background: var(--ml-surface-hover);
    border-radius: var(--ml-radius-sm);
    border: 1px solid var(--ml-border);
  }

  /* ---------- Trend Reversal Alert Premium ---------- */
  .analysis-suite--marketlens .trend-reversal-alert {
    border-radius: var(--ml-radius-md) !important;
    background: linear-gradient(135deg, #0f2d3a 0%, #1a3d44 50%, #0e352e 100%) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
  }

  /* ---------- Trading Setup Visual ---------- */
  .analysis-suite--marketlens .trade-levels-visualization {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
    border-radius: var(--ml-radius-sm);
  }

  .analysis-suite--marketlens .trade-levels-visualization .level .badge {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.25em 0.5em;
  }

  .analysis-suite--marketlens .trade-levels-visualization hr.dashed-line {
    border-top: 1px dashed;
    opacity: 0.5;
  }

  .analysis-suite--marketlens .trade-levels-visualization hr.solid-line {
    border-top: 2px solid;
    opacity: 0.7;
  }

  /* ---------- Indicator Table Premium ---------- */
  .analysis-suite--marketlens .indicator-table-wrapper {
    border: 1px solid var(--ml-border);
    border-radius: var(--ml-radius-sm);
    overflow: hidden;
  }

  .analysis-suite--marketlens .indicator-group-header {
    background: var(--ml-surface-hover) !important;
    transition: var(--ml-transition);
  }

  .analysis-suite--marketlens .indicator-group-header:hover {
    background: var(--ml-border) !important;
  }

  .analysis-suite--marketlens .indicator-detail-table thead th {
    background: var(--ml-surface-hover);
    color: var(--ml-text-muted);
    font-size: 0.65rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--ml-border);
  }

  .analysis-suite--marketlens .indicator-detail-table td {
    font-size: 0.78rem;
    color: var(--ml-text);
    border-color: var(--ml-border);
  }

  /* ---------- Modal/Dark Overrides ---------- */
  .analysis-suite--marketlens .tv-modal-overlay,
  .analysis-suite--marketlens .tv-info-overlay {
    z-index: 1100;
  }

  .analysis-suite--marketlens .tv-modal {
    border-radius: var(--ml-radius-md);
    box-shadow: 0 25px 80px rgba(0,0,0,0.65);
  }

  .analysis-suite--marketlens .tv-modal-header {
    padding: 1rem 1.25rem;
  }

  .analysis-suite--marketlens .tv-modal-body {
    padding: 1.15rem;
  }

  .analysis-suite--marketlens .tv-indicator-item {
    padding: 0.65rem 0.85rem;
    border-radius: var(--ml-radius-sm);
    transition: var(--ml-transition);
  }

  /* ---------- Mobile First — Complete Responsive Overhaul ---------- */
  @media (max-width: 1199.98px) {
    .analysis-suite--marketlens .market-summary-strip .h3 {
      font-size: 1.4rem;
    }
    .analysis-suite--marketlens .market-summary-strip .current-price-strip {
      font-size: 1.4rem !important;
    }
  }

  @media (max-width: 991.98px) {
    .analysis-suite--marketlens .card-header {
      padding: 0.75rem 1rem;
    }
    .analysis-suite--marketlens .card-header h5 {
      font-size: 0.8rem;
    }
    .analysis-suite--marketlens .card-body {
      padding: 0.9rem 1rem;
    }
    .analysis-suite--marketlens .market-summary-strip .col-md-2 .fw-bold {
      font-size: 0.8rem;
    }
    .analysis-suite--marketlens .market-summary-strip .current-price-strip {
      font-size: 1.25rem !important;
    }
    .analysis-suite--marketlens .mini-indicator-card .fs-6 {
      font-size: 0.85rem !important;
    }
    .analysis-suite--marketlens .confluence-score .fs-5 {
      font-size: 0.95rem !important;
    }
    .analysis-suite--marketlens .trade-levels-visualization {
      height: 170px !important;
    }
  }

  @media (max-width: 767.98px) {
    .analysis-suite--marketlens .dashboard-container > .d-flex:first-child {
      flex-direction: column;
      gap: 0.75rem;
      align-items: stretch !important;
    }
    .analysis-suite--marketlens .dashboard-container > .d-flex:first-child .btn-group {
      width: 100%;
    }
    .analysis-suite--marketlens .dashboard-container > .d-flex:first-child .btn-group .dropdown-toggle {
      width: 100%;
    }
    .analysis-suite--marketlens .market-summary-strip {
      padding: 0.75rem !important;
    }
    .analysis-suite--marketlens .market-summary-strip .row > div {
      margin-bottom: 0.5rem;
    }
    .analysis-suite--marketlens .market-summary-strip .current-price-strip {
      font-size: 1.1rem !important;
    }
    .analysis-suite--marketlens .market-summary-strip .h3 {
      font-size: 1.1rem;
    }
    .analysis-suite--marketlens .confluence-score {
      padding: 0.5rem !important;
    }
    .analysis-suite--marketlens .confluence-track {
      height: 8px !important;
    }
    .analysis-suite--marketlens .trade-levels-visualization {
      height: 150px !important;
    }
    .analysis-suite--marketlens .ladder-container {
      height: 130px !important;
    }
    .analysis-suite--marketlens .ladder-line .badge {
      font-size: 0.55rem !important;
      padding: 0.15em 0.35em !important;
    }
    .analysis-suite--marketlens .ladder-line .small.fw-bold {
      font-size: 0.6rem !important;
    }
    .analysis-suite--marketlens .indicator-detail-table td,
    .analysis-suite--marketlens .indicator-detail-table th {
      padding: 0.25rem 0.35rem;
      font-size: 0.68rem;
    }
    .analysis-suite--marketlens .indicator-group-header {
      padding: 0.45rem 0.6rem !important;
    }
    .analysis-suite--marketlens .indicator-group-header .fw-semibold {
      font-size: 0.7rem;
    }
    .analysis-suite--marketlens .mini-indicator-card {
      padding: 0.45rem 0.25rem !important;
    }
    .analysis-suite--marketlens .mini-indicator-card .fs-6 {
      font-size: 0.75rem !important;
    }
    .analysis-suite--marketlens .mini-indicator-card .badge {
      font-size: 0.55rem !important;
    }
    .analysis-suite--marketlens .risk-reward-track {
      height: 10px !important;
    }
    .analysis-suite--marketlens .risk-reward-track div {
      font-size: 0.55rem !important;
    }
    .analysis-suite--marketlens .card-body .border-start {
      border-width: 2px !important;
    }
    .analysis-suite--marketlens .advanced-insight-section .card-body {
      padding: 0.6rem !important;
    }
    .analysis-suite--marketlens .advanced-insight-section h6 {
      font-size: 0.7rem;
    }
    .analysis-suite--marketlens .advanced-insight-section ul li {
      padding: 0.35rem 0.5rem !important;
    }
    .analysis-suite--marketlens .advanced-insight-section ul li span {
      font-size: 0.7rem;
    }
    .analysis-suite--marketlens .price-thermometer .price-marker {
      width: 8px;
      height: 14px;
      top: -5px;
    }
    .analysis-suite--marketlens .badge.fs-4 {
      font-size: 1rem !important;
      padding: 0.35rem 0.75rem;
    }
    .analysis-suite--marketlens .volume-bar-wrapper {
      gap: 4px;
    }
    .analysis-suite--marketlens .volume-bar-wrapper .small {
      font-size: 0.6rem;
    }
    .analysis-suite--marketlens .volume-bar-visual {
      height: 3px;
    }
    .analysis-suite--marketlens .marketlens-tv .tv-chart-toolbar {
      overflow-x: auto;
      flex-wrap: nowrap;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }
    .analysis-suite--marketlens .marketlens-tv .tv-chart-toolbar::-webkit-scrollbar { display: none; }
    .analysis-suite--marketlens .marketlens-tv #candlestickChart {
      height: 350px;
    }
    .analysis-suite--marketlens .marketlens-tv .tv-chart-container {
      border-radius: var(--ml-radius-sm);
    }
    .analysis-suite--marketlens .marketlens-tv .tv-price-panel {
      grid-template-columns: repeat(2, 1fr);
      gap: 6px;
      padding: 10px;
    }
    .analysis-suite--marketlens .marketlens-tv .tv-price-item {
      gap: 2px;
    }
    .analysis-suite--marketlens .marketlens-tv .tv-price-label {
      font-size: 0.6rem;
    }
    .analysis-suite--marketlens .marketlens-tv .tv-price-value {
      font-size: 0.75rem;
    }
    .analysis-suite--marketlens .marketlens-tv .tv-timeframes {
      order: 2;
    }
    .analysis-suite--marketlens .marketlens-tv .tv-indicator-btn {
      order: 3;
      padding: 0.35rem 0.55rem;
    }
    .analysis-suite--marketlens .marketlens-tv .tv-indicator-btn span {
      display: none;
    }
    .analysis-suite--marketlens .marketlens-tv .tv-symbol {
      order: 1;
    }
    .analysis-suite--marketlens .marketlens-tv .tv-status {
      order: 4;
      margin-left: 0;
    }
    .analysis-suite--marketlens .marketlens-tv .tv-tool-btn span {
      display: none;
    }
  }

  @media (max-width: 575.98px) {
    .analysis-suite--marketlens .row.g-3 {
      --bs-gutter-y: 0.5rem;
    }
    .analysis-suite--marketlens .card-header {
      padding: 0.6rem 0.75rem;
    }
    .analysis-suite--marketlens .card-header h5 {
      font-size: 0.75rem;
    }
    .analysis-suite--marketlens .card-body {
      padding: 0.65rem 0.75rem;
    }
    .analysis-suite--marketlens .card-title {
      font-size: 0.8rem;
      padding-bottom: 0.5rem;
      margin-bottom: 0.65rem;
    }
    .analysis-suite--marketlens .market-summary-strip {
      padding: 0.6rem !important;
    }
    .analysis-suite--marketlens .market-summary-strip .current-price-strip {
      font-size: 1rem !important;
    }
    .analysis-suite--marketlens .market-summary-strip .fw-bold {
      font-size: 0.75rem !important;
    }
    .analysis-suite--marketlens .market-summary-strip .small {
      font-size: 0.6rem;
    }
    .analysis-suite--marketlens .confluence-score .d-flex .small {
      font-size: 0.6rem;
    }
    .analysis-suite--marketlens .confluence-track {
      height: 6px !important;
    }
    .analysis-suite--marketlens .mini-indicator-card {
      padding: 0.35rem 0.2rem !important;
    }
    .analysis-suite--marketlens .mini-indicator-card .fw-semibold {
      font-size: 0.55rem;
    }
    .analysis-suite--marketlens .mini-indicator-card .fs-6 {
      font-size: 0.7rem !important;
    }
    .analysis-suite--marketlens .badge.rounded-pill {
      font-size: 0.6rem !important;
    }
    .analysis-suite--marketlens .trade-levels-visualization {
      height: 130px !important;
    }
    .analysis-suite--marketlens .trade-levels-visualization .level .badge {
      font-size: 0.55rem;
      padding: 0.15em 0.4em;
    }
    .analysis-suite--marketlens .ladder-container {
      height: 110px !important;
      padding: 2px 6px !important;
    }
    .analysis-suite--marketlens .ladder-line .badge {
      font-size: 0.5rem !important;
      padding: 0.1em 0.3em !important;
    }
    .analysis-suite--marketlens .ladder-line hr {
      margin: 0;
    }
    .analysis-suite--marketlens .ladder-line .small.fw-bold {
      font-size: 0.55rem !important;
    }
    .analysis-suite--marketlens .row.g-3 > [class*="col-"] {
      padding-left: 6px;
      padding-right: 6px;
    }
    .analysis-suite--marketlens .row.g-3 {
      margin-left: -6px;
      margin-right: -6px;
    }
    .analysis-suite--marketlens .indicator-detail-table td,
    .analysis-suite--marketlens .indicator-detail-table th {
      padding: 0.2rem 0.25rem;
      font-size: 0.6rem;
    }
    .analysis-suite--marketlens .indicator-group-header {
      padding: 0.35rem 0.5rem !important;
    }
    .analysis-suite--marketlens .indicator-group-header .fw-semibold {
      font-size: 0.65rem;
    }
    .analysis-suite--marketlens .indicator-group-header .indicator-count {
      font-size: 0.55rem;
    }
    .analysis-suite--marketlens .advanced-insight-section .card-body {
      padding: 0.5rem !important;
    }
    .analysis-suite--marketlens .advanced-insight-section h6 {
      font-size: 0.65rem;
    }
    .analysis-suite--marketlens .advanced-insight-section ul li {
      padding: 0.3rem 0.4rem !important;
    }
    .analysis-suite--marketlens .advanced-insight-section ul li span {
      font-size: 0.65rem;
    }
    .analysis-suite--marketlens .marketlens-tv {
      padding: 10px;
    }
    .analysis-suite--marketlens .marketlens-tv #candlestickChart {
      height: 300px;
    }
    .analysis-suite--marketlens .marketlens-tv .tv-header {
      flex-wrap: wrap;
      gap: 6px;
    }
    .analysis-suite--marketlens .marketlens-tv .tv-tf-btn {
      padding: 0.25rem 0.5rem;
      font-size: 0.7rem;
    }
    .analysis-suite--marketlens .marketlens-tv .tv-quick-ind {
      padding: 0.2rem 0.35rem;
      font-size: 0.65rem;
    }
    .analysis-suite--marketlens .marketlens-tv .tv-price-panel {
      grid-template-columns: repeat(2, 1fr);
      padding: 8px;
    }
    .analysis-suite--marketlens .risk-reward-track {
      height: 8px !important;
    }
    .analysis-suite--marketlens .price-thermometer .position-absolute > div {
      width: 8px !important;
      height: 16px !important;
    }
    .analysis-suite--marketlens .alert {
      padding: 0.5rem 0.75rem;
    }
    .analysis-suite--marketlens svg {
      max-width: 100%;
      height: auto;
    }
  }

  /* ---------- Utility: Scrollable Tables on Mobile ---------- */
  .analysis-suite--marketlens .table-responsive-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1px;
  }

  /* ---------- Reduced Motion ---------- */
  @media (prefers-reduced-motion: reduce) {
    .analysis-suite--marketlens *,
    .analysis-suite--marketlens *::before,
    .analysis-suite--marketlens *::after {
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
    }
  }
}

/* =============================================
   ML REDESIGN — Mobile-First Layout
   Prefix .ml- untuk menghindari konflik
   ============================================= */
.ml-redesign {
  --ml-teal: #0f766e;
  --ml-teal-dark: #0d5e57;
  --ml-bg: #f8faf8;
  --ml-surface: #ffffff;
  --ml-text: #0f172a;
  --ml-text-soft: #475569;
  --ml-text-muted: #94a3b8;
  --ml-border: #e5e7eb;
  --ml-radius: 10px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ── Sticky Header ── */
.ml-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--ml-teal);
  padding: 10px 16px;
  box-shadow: 0 2px 12px rgba(15,118,110,0.25);
}
.ml-header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
}
.ml-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.ml-header-logo i { font-size: 18px; }
.ml-header-form {
  flex: 1;
  display: flex;
  gap: 6px;
  min-width: 0;
}
.ml-header-form input {
  flex: 1;
  min-width: 80px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}
.ml-header-form input::placeholder { color: rgba(255,255,255,0.6); }
.ml-header-form input:focus { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.4); }
.ml-header-form button {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.ml-header-form button:hover { background: rgba(255,255,255,0.3); }
@media (min-width: 640px) {
  .ml-header-date { display: block; }
}

/* ── Section Spacing ── */
.ml-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.ml-section + .ml-section { margin-top: 12px; }

/* ── Hero Ticker Card ── */
.ml-hero {
  background: var(--ml-surface);
  border-radius: var(--ml-radius);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.ml-hero-left { min-width: 0; flex: 1; }
.ml-hero-ticker {
  font-size: 20px;
  font-weight: 700;
  color: var(--ml-text);
  line-height: 1.2;
}
.ml-hero-company {
  font-size: 12px;
  color: var(--ml-text-muted);
  margin-top: 1px;
}
.ml-hero-badges {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.ml-hero-right { text-align: right; flex-shrink: 0; }
.ml-hero-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--ml-text);
  line-height: 1.1;
}
.ml-badge-rec {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ml-badge-rec.hold { background: #fef9c3; color: #92400e; }
.ml-badge-rec.buy  { background: #dcfce7; color: #15803d; }
.ml-badge-rec.sell { background: #fee2e2; color: #b91c1c; }
.ml-badge-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
}
.ml-badge-trend.bull { background: #dcfce7; color: #15803d; }
.ml-badge-trend.bear { background: #fee2e2; color: #b91c1c; }
.ml-badge-trend.neu  { background: #f5f5f4; color: #78716c; }
.ml-hero-therm {
  margin-top: 8px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, #16a34a, #f59e0b, #dc2626);
  position: relative;
}
.ml-hero-therm-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  border: 2px solid var(--ml-teal);
  border-radius: 50%;
  top: -3px;
  transform: translateX(-50%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ── Stat Strip ── */
.ml-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--ml-border);
  border-radius: var(--ml-radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.ml-stat-item {
  background: var(--ml-surface);
  padding: 10px 8px;
  text-align: center;
}
.ml-stat-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--ml-text);
  line-height: 1.2;
}
.ml-stat-label {
  font-size: 10px;
  color: var(--ml-text-muted);
  margin-top: 1px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Card Base ── */
.ml-card {
  background: var(--ml-surface);
  border-radius: var(--ml-radius);
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.ml-card-title {
  font-size: 12px;
  font-weight: 650;
  color: var(--ml-text);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ml-card-title i { font-size: 14px; }

/* ── Recommendation Box ── */
.ml-rec-hold { border: 1.5px solid #f59e0b; background: #fffbeb; }
.ml-rec-label {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}
.ml-rec-sub {
  font-size: 11px;
  color: var(--ml-text-soft);
  margin-top: 1px;
}
.ml-rec-text {
  font-size: 12px;
  color: var(--ml-text-soft);
  line-height: 1.55;
  margin-top: 6px;
}


/* ── Mini Indicators (RSI, MACD, STO) ── */
.ml-mini-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.ml-mini-item {
  flex: 1;
  text-align: center;
  padding: 6px;
  border-radius: 6px;
}
.ml-mini-name {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.ml-mini-val {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.ml-mini-badge {
  display: inline-block;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 500;
}


/* ── Indicator Row (Flex, replaces table) ── */
.ml-ind-section { margin-bottom: 4px; }
.ml-ind-group-title {
  font-size: 11px;
  font-weight: 650;
  color: var(--ml-teal);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 0 4px;
  border-bottom: 1px solid var(--ml-border);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.ml-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
}
.ml-badge-bull { background: #dcfce7; color: #15803d; }
.ml-badge-bear { background: #fee2e2; color: #b91c1c; }
.ml-badge-ob   { background: #fef9c3; color: #92400e; }
.ml-badge-neu  { background: #f5f5f4; color: #888888; }
.ml-ind-more {
  display: block;
  text-align: center;
  font-size: 11px;
  color: var(--ml-teal);
  padding: 8px 0;
  cursor: pointer;
  font-weight: 500;
}


/* ── Position Sizing ── */
.ml-pos-input label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ml-text-soft);
  margin-bottom: 3px;
  display: block;
}
.ml-pos-input input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--ml-border);
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  background: var(--ml-surface);
}
.ml-pos-input input:focus { border-color: var(--ml-teal); box-shadow: 0 0 0 2px rgba(15,118,110,0.12); }
.ml-pos-result-item {
  background: #f7f7f5;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
}
.ml-pos-result-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--ml-text);
}
.ml-pos-result-label {
  font-size: 9px;
  color: var(--ml-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ml-pos-levels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--ml-border);
  font-size: 12px;
}
.ml-pos-level-item { text-align: center; }
.ml-pos-level-item .name { font-size: 9px; color: var(--ml-text-muted); text-transform: uppercase; }
.ml-pos-level-item .price { font-size: 13px; font-weight: 700; }
.ml-pos-level-item .name.tp { color: #16a34a; }
.ml-pos-level-item .name.sl { color: #dc2626; }
.ml-pos-line {
  flex: 1;
  height: 0;
  border-top: 1px dashed var(--ml-border);
  margin: 0 6px;
}


/* ── Entry Readiness ── */
.ml-readiness-bar-wrap {
  flex: 1;
  background: #f5f5f4;
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
}
.ml-readiness-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s ease;
}
.ml-readiness-bar.ready   { background: #16a34a; }
.ml-readiness-bar.caution { background: #ca8a04; }
.ml-readiness-bar.poor    { background: #dc2626; }
.ml-readiness-status {
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.ml-readiness-status.ready   { color: #16a34a; }
.ml-readiness-status.caution { color: #ca8a04; }
.ml-readiness-status.poor    { color: #dc2626; }


/* ── Detail Section (collapsible) ── */
.ml-detail-content { display: none; }
.ml-detail-content.open { display: block; }

/* ── Chart Section ── */
.ml-chart .marketlens-tv {
  border-radius: var(--ml-radius);
  padding: 12px;
}

/* ── Empty state adjustments ── */
.ml-redesign .analysis-suite-hero-section { display: none; }
.ml-redesign .dashboard-container > .d-flex:first-child { display: none; }

/* ── Responsive adjustments ── */
@media (max-width: 480px) {
  .ml-hero { padding: 12px; }
  .ml-hero-ticker { font-size: 18px; }
  .ml-hero-price { font-size: 20px; }
  .ml-stat-strip { grid-template-columns: repeat(3, 1fr); }
  .ml-stat-value { font-size: 13px; }
  .stat-item-strength { display: none; }
  .ml-insight { font-size: 12px; padding: 10px 12px; }
  .ml-pos-grid { grid-template-columns: 1fr; }
  .ml-mini-row { gap: 4px; }
  .ml-mini-val { font-size: 12px; }
}

/* ── ml-redesign additional classes ── */

/* Header */
.ml-header-back, .ml-header-search {
  background: none; border: none; color: #fff; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 8px; transition: background 0.15s;
  padding: 0;
}
.ml-header-back:hover, .ml-header-search:hover { background: rgba(255,255,255,0.15); }
.ml-header-title { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 0; }
.ml-header-code { font-weight: 700; font-size: 15px; color: #fff; line-height: 1.2; }
.ml-header-date { font-size: 11px; color: rgba(255,255,255,0.65); }

/* Hero */
.ml-hero-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ml-hero-value { font-size: 24px; font-weight: 800; color: var(--ml-text, #102a2e); }
.ml-hero-conviction { font-size: 11px; color: var(--ml-text-muted, #6b7280); }
.ml-hero-change.up { color: #16a34a; }
.ml-hero-change.down { color: #dc2626; }
.ml-hero-change.neutral { color: var(--ml-text-muted, #6b7280); }

/* Badges for rec values */
.ml-hero-rec { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ml-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ml-badge-buy  { background: #dcfce7; color: #15803d; }
.ml-badge-sell { background: #fee2e2; color: #b91c1c; }
.ml-badge-hold { background: #fef9c3; color: #92400e; }
.ml-badge-sm { font-size: 10px; padding: 2px 6px; border-radius: 4px; }

/* Stat strip sub */
.ml-stat-sub.up { color: #16a34a; }
.ml-stat-sub.down { color: #dc2626; }

/* Insight */
.ml-insight { display: flex; gap: 10px; padding: 12px 14px; margin: 0 14px 10px; }
.ml-insight-icon { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: rgba(15,118,110,0.1); color: var(--ml-teal, #0f766e); display: flex; align-items: center; justify-content: center; }
.ml-insight-body { flex: 1; min-width: 0; }
.ml-insight-text { font-size: 13px; color: var(--ml-text-soft, #374151); margin: 0; line-height: 1.5; }
.ml-insight-confluence { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ml-insight-bar { flex: 1; height: 4px; background: #e5e7eb; border-radius: 2px; overflow: hidden; }
.ml-insight-fill { display: block; height: 100%; border-radius: 2px; transition: width 0.3s; }
.ml-insight-pct { font-size: 10px; color: var(--ml-text-muted, #6b7280); white-space: nowrap; }

/* Chart */
.ml-chart-tools { display: flex; gap: 2px; }
.ml-chart-btn { background: none; border: none; font-size: 11px; font-weight: 600; padding: 4px 8px; cursor: pointer; border-radius: 4px; color: var(--ml-text-muted, #6b7280); transition: all 0.15s; }
.ml-chart-btn:hover { background: #f3f4f6; }
.ml-chart-btn.active { background: var(--ml-teal, #0f766e); color: #fff; }
.ml-chart-area { height: 240px; background: #f9fafb; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin: 8px 0; position: relative; overflow: hidden; }
.ml-chart-area canvas { width: 100%; height: 100%; }
.ml-chart-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ml-chart-indicators { display: flex; gap: 12px; flex-wrap: wrap; padding: 4px 0; }
.ml-chk { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ml-text-soft, #374151); cursor: pointer; }
.ml-chk input { accent-color: var(--ml-teal, #0f766e); }
.ml-price-panel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; padding: 8px; background: #f9fafb; border-radius: 8px; }
.ml-price-item { text-align: center; }
.ml-price-label { font-size: 9px; color: var(--ml-text-muted, #6b7280); text-transform: uppercase; letter-spacing: 0.5px; display: block; }
.ml-price-val { font-size: 13px; font-weight: 700; color: var(--ml-text, #102a2e); display: block; }

/* Recommendation card */
.ml-rec-card { }
.ml-rec-box { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; }
.ml-rec-box.buy  { border: 1.5px solid #16a34a; background: #f0fdf4; }
.ml-rec-box.sell { border: 1.5px solid #dc2626; background: #fef2f2; }
.ml-rec-box.hold { border: 1.5px solid #f59e0b; background: #fffbeb; }
.ml-rec-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ml-rec-box.buy .ml-rec-icon  { background: #dcfce7; color: #15803d; }
.ml-rec-box.sell .ml-rec-icon { background: #fee2e2; color: #b91c1c; }
.ml-rec-box.hold .ml-rec-icon { background: #fef3c7; color: #92400e; }
.ml-rec-body { flex: 1; min-width: 0; }
.ml-rec-value { font-size: 16px; font-weight: 800; line-height: 1.2; }
.ml-rec-box.buy .ml-rec-value  { color: #15803d; }
.ml-rec-box.sell .ml-rec-value { color: #b91c1c; }
.ml-rec-box.hold .ml-rec-value { color: #92400e; }
.ml-rec-bar { margin-top: 4px; }
.ml-rec-bar-track { height: 4px; display: flex; border-radius: 2px; overflow: hidden; background: #e5e7eb; }
.ml-rec-bar-fill.buy { background: #16a34a; }
.ml-rec-bar-fill.neutral { background: #eab308; }
.ml-rec-bar-fill.sell { background: #dc2626; }
.ml-rec-bar-labels { display: flex; justify-content: space-between; font-size: 9px; color: var(--ml-text-muted); margin-top: 2px; }
.ml-rec-rr { text-align: right; flex-shrink: 0; }
.ml-rec-rr-label { font-size: 9px; color: var(--ml-text-muted, #6b7280); text-transform: uppercase; letter-spacing: 0.3px; display: block; }
.ml-rec-rr-value { font-size: 15px; font-weight: 800; color: var(--ml-text, #102a2e); }

/* Signal card */
.ml-signal-card { }
.ml-signal-body { }
.ml-signal-row { display: flex; flex-direction: column; gap: 8px; }
.ml-signal-item { display: flex; align-items: center; gap: 8px; }
.ml-signal-track { flex: 1; height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.ml-signal-fill { height: 100%; border-radius: 4px; transition: width 0.3s; }
.ml-signal-fill.bullish { background: #16a34a; }
.ml-signal-fill.bearish { background: #dc2626; }
.ml-signal-num { font-size: 12px; font-weight: 700; color: var(--ml-text, #102a2e); min-width: 20px; text-align: right; }

/* Mini indicators */
.ml-mini-value { font-size: 14px; font-weight: 700; }
.ml-mini-value.up { color: #16a34a; }
.ml-mini-value.down { color: #dc2626; }
.ml-mini-value.overbought { color: #dc2626; }

/* S/R */
.ml-sr-card { }
.ml-sr-visual { display: flex; flex-direction: column; gap: 6px; position: relative; padding: 8px 0; }
.ml-sr-lane { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; border-radius: 6px; font-size: 13px; }
.ml-sr-lane.resistance { background: #fef2f2; }
.ml-sr-lane.resistance .ml-sr-label { color: #dc2626; }
.ml-sr-lane.resistance .ml-sr-val { color: #dc2626; font-weight: 700; }
.ml-sr-lane.vwap { background: #f0fdf4; }
.ml-sr-lane.vwap .ml-sr-label { color: #16a34a; }
.ml-sr-lane.vwap .ml-sr-val { color: #16a34a; font-weight: 800; font-size: 14px; }
.ml-sr-lane.support { background: #eff6ff; }
.ml-sr-lane.support .ml-sr-label { color: #2563eb; }
.ml-sr-lane.support .ml-sr-val { color: #2563eb; font-weight: 700; }
.ml-sr-label { font-size: 12px; font-weight: 500; }
.ml-sr-val { font-size: 13px; }
.ml-sr-ruler { position: relative; height: 12px; margin: 2px 0; background: linear-gradient(to right, #2563eb, #16a34a, #dc2626); border-radius: 6px; }
.ml-sr-marker { position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 2; }
.ml-sr-dot { display: block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); background: #102a2e; }

/* Indicator groups */
.ml-ind-card { }
.ml-ind-row { display: flex; flex-direction: column; gap: 6px; }
.ml-ind-group { border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.ml-ind-group-header { display: flex; align-items: center; gap: 6px; width: 100%; padding: 10px 12px; background: #f9fafb; border: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ml-text, #102a2e); text-align: left; transition: background 0.15s; }
.ml-ind-group-header:hover { background: #f3f4f6; }
.ml-ind-group-header svg { flex-shrink: 0; transition: transform 0.15s; }
.ml-ind-group-header.collapsed svg { transform: rotate(-90deg); }
.ml-ind-group-header span:first-of-type { flex: 1; }
.ml-ind-group-body { display: none; padding: 6px 12px 10px; }
.ml-ind-group-body.show { display: block; }
.ml-ind-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #f3f4f6; }
.ml-ind-item:last-child { border-bottom: none; }
.ml-ind-name { font-size: 13px; color: var(--ml-text-soft, #374151); }
.ml-ind-val { font-size: 13px; font-weight: 700; color: var(--ml-text, #102a2e); }

/* Position sizing */
.ml-pos-card { }
.ml-pos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.ml-pos-item { text-align: center; padding: 8px 4px; background: #f9fafb; border-radius: 8px; }
.ml-pos-label { font-size: 9px; color: var(--ml-text-muted, #6b7280); text-transform: uppercase; letter-spacing: 0.3px; display: block; }
.ml-pos-val { font-size: 13px; font-weight: 700; color: var(--ml-text, #102a2e); display: block; margin-top: 2px; }
.ml-pos-val.up { color: #16a34a; }
.ml-pos-val.down { color: #dc2626; }
.ml-pos-result { display: flex; gap: 12px; margin-bottom: 10px; }
.ml-pos-rr, .ml-pos-risk { flex: 1; text-align: center; padding: 8px; background: #f0fdf4; border-radius: 8px; }
.ml-pos-rr-label, .ml-pos-risk-label { font-size: 9px; color: var(--ml-text-muted); text-transform: uppercase; letter-spacing: 0.3px; display: block; }
.ml-pos-rr-value { font-size: 18px; font-weight: 800; color: #15803d; }
.ml-pos-risk-value { font-size: 14px; font-weight: 700; color: #dc2626; }
.ml-pos-calc { padding: 10px; background: #f9fafb; border-radius: 8px; }
.ml-pos-calc-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ml-pos-calc-label { font-size: 12px; color: var(--ml-text-soft); min-width: 80px; flex-shrink: 0; }
.ml-pos-calc-input { flex: 1; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; }
.ml-pos-calc-input:focus { border-color: var(--ml-teal, #0f766e); outline: none; box-shadow: 0 0 0 2px rgba(15,118,110,0.12); }
.ml-pos-calc-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.ml-pos-calc-item { text-align: center; padding: 8px 4px; background: #fff; border-radius: 6px; border: 1px solid #e5e7eb; }
.ml-pos-calc-item-label { font-size: 10px; color: var(--ml-text-muted); display: block; }
.ml-pos-calc-item-value { font-size: 14px; font-weight: 700; color: var(--ml-text); display: block; margin-top: 2px; }

/* Readiness */
.ml-readiness-card { }
.ml-readiness-header { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.ml-readiness-score { flex-shrink: 0; }
.ml-readiness-circle { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; position: relative; }
.ml-readiness-circle::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--color, #22c55e) var(--pct, 0%), #e5e7eb var(--pct, 0%)); mask: radial-gradient(farthest-side, transparent 20px, #000 21px); }
.ml-readiness-pct { font-size: 14px; font-weight: 800; z-index: 1; color: var(--color, #22c55e); }
.ml-readiness-info { flex: 1; }
.ml-readiness-label { font-size: 15px; font-weight: 700; display: block; }
.ml-readiness-count { font-size: 12px; color: var(--ml-text-muted); }
.ml-checklist { display: flex; flex-direction: column; gap: 4px; }
.ml-check-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; background: #f9fafb; }
.ml-check-item.pass { background: #f0fdf4; }
.ml-check-icon { flex-shrink: 0; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
.ml-check-text { font-size: 12px; color: var(--ml-text-soft); line-height: 1.3; }
.ml-check-item.pass .ml-check-text { color: #15803d; font-weight: 500; }

/* Bottom bar */
.ml-bottom-bar { display: flex; gap: 8px; padding: 8px 14px; background: #fff; border-top: 1px solid #e5e7eb; position: sticky; bottom: 0; z-index: 100; box-shadow: 0 -2px 8px rgba(0,0,0,0.06); }
.ml-bottom-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all 0.15s; }
.ml-bottom-primary { background: var(--ml-teal, #0f766e); color: #fff; }
.ml-bottom-primary:hover { background: #115e59; }
.ml-bottom-secondary { background: #f3f4f6; color: var(--ml-text, #102a2e); }
.ml-bottom-secondary:hover { background: #e5e7eb; }

/* Detail analysis toggle */
.ml-old-content { margin-top: 0; }
.ml-detail-toggle { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; margin: 0 14px 4px; cursor: pointer; border-radius: 8px; background: #f9fafb; color: var(--ml-teal, #0f766e); font-size: 13px; font-weight: 600; transition: background 0.15s; }
.ml-detail-toggle:hover { background: #f0fdfa; }

