/* EdgeBreak Master Scanner inside NASDAQ workspace */
.eb-master-side-switch{
  display:none;
  grid-template-columns:1fr 1fr;
  gap:5px;
  margin:0 0 12px;
  padding:4px;
  border:1px solid var(--eb-line,#e5eaf0);
  border-radius:12px;
  background:#f7faf8;
}
.eb-master-side-switch.is-visible{display:grid}
.eb-master-side-switch button{
  min-height:34px;border:0;border-radius:9px;background:transparent;color:#64748b;
  font:inherit;font-size:11px;font-weight:850;cursor:pointer;
}
.eb-master-side-switch button.active{background:#fff;color:#08783b;box-shadow:0 2px 8px rgba(15,23,42,.08)}
#ebMasterFiltersPanel{display:none}
#ebMasterFiltersPanel.active{display:block}
.eb-master-filter-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin:4px 2px 12px}
.eb-master-filter-head strong{display:block;color:#0f172a;font-size:15px}
.eb-master-filter-head span{display:block;margin-top:2px;color:#94a3b8;font-size:10px}
.eb-master-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin-bottom:12px}
.eb-master-tab{border:0;border-bottom:2px solid transparent;background:transparent;padding:9px 3px;color:#64748b;font:inherit;font-size:10px;font-weight:850;cursor:pointer}
.eb-master-tab.active{color:#08783b;border-color:#16a34a}
.eb-master-panel{display:none}
.eb-master-panel.active{display:block}
.eb-master-section{padding:11px 0;border-bottom:1px solid #edf2ef}
.eb-master-section:last-child{border-bottom:0}
.eb-master-section h4{margin:0 0 3px;color:#0f172a;font-size:12px}
.eb-master-section p{margin:0 0 8px;color:#94a3b8;font-size:10px;line-height:1.45}
.eb-master-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.eb-master-choice{
  min-height:34px;border:1px solid #dfe8e2;border-radius:9px;background:#fff;color:#334155;
  font:inherit;font-size:10px;font-weight:800;cursor:pointer;
}
.eb-master-choice.active{border-color:#16a34a;background:#eef9f1;color:#08783b}
.eb-master-field{display:grid;gap:4px;margin-top:7px}
.eb-master-field label{color:#64748b;font-size:9px;font-weight:800}
.eb-master-field-help{display:block;color:#94a3b8;font-size:8.5px;line-height:1.4}
.eb-master-field select,.eb-master-field input{
  width:100%;min-height:35px;border:1px solid #d6dee6;border-radius:9px;background:#fff;color:#0f172a;
  padding:6px 8px;font:inherit;font-size:10px;box-sizing:border-box;
}
.eb-master-row{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.eb-master-check{display:flex;align-items:center;gap:6px;color:#475569;font-size:10px;margin-top:7px}
.eb-master-check input{width:14px;height:14px}
.eb-master-actions{
  position:sticky;bottom:0;z-index:3;display:grid;gap:6px;margin:12px -2px -4px;padding:10px 2px 4px;
  background:linear-gradient(180deg,rgba(255,255,255,.82),#fff 30%);
}
.eb-master-btn{
  min-height:38px;border:1px solid #d6dee6;border-radius:10px;background:#fff;color:#0f172a;
  font:inherit;font-size:11px;font-weight:850;cursor:pointer;
}
.eb-master-btn.primary{border-color:#08783b;background:#08783b;color:#fff}
.eb-master-btn.danger{color:#b42318}
.eb-master-note{color:#94a3b8;font-size:9px;line-height:1.45;text-align:center}
.eb-master-saved-item{padding:10px;border:1px solid #e5eaf0;border-radius:10px;background:#fff;margin-bottom:7px}
.eb-master-saved-item strong{display:block;color:#0f172a;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.eb-master-saved-item small{display:block;margin-top:3px;color:#94a3b8;font-size:9px;line-height:1.4}
.eb-master-saved-actions{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}
.eb-master-saved-actions button{border:1px solid #dfe5eb;border-radius:7px;background:#f8fafc;padding:5px 6px;font-size:9px;font-weight:800;cursor:pointer}
.eb-master-saved-actions button.danger{color:#b42318}
.eb-master-empty{padding:12px 4px;color:#94a3b8;font-size:10px;line-height:1.5}

#masterScannerWorkspace{width:100%;max-width:none}
.eb-master-workspace-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 14px;
}
.eb-master-workspace-head h2{margin:0;color:#0f172a;font-size:26px;letter-spacing:-.03em}
.eb-master-workspace-head p{margin:5px 0 0;color:#64748b;font-size:12px}
.eb-master-workspace-actions{display:flex;gap:7px;flex-wrap:wrap}
.eb-master-workspace-actions button{
  min-height:38px;border:1px solid #d6dee6;border-radius:10px;background:#fff;color:#0f172a;
  padding:0 12px;font:inherit;font-size:11px;font-weight:850;cursor:pointer;
}
.eb-master-workspace-actions button.primary{border-color:#08783b;background:#08783b;color:#fff}
.eb-master-active{padding:10px 12px;border:1px solid #e4ebe7;border-radius:12px;background:#fbfdfc;margin-bottom:12px}
.eb-master-active strong{display:block;margin-bottom:6px;color:#0f172a;font-size:10px;text-transform:uppercase;letter-spacing:.07em}
.eb-master-chips{display:flex;flex-wrap:wrap;gap:5px}
.eb-master-chip{border:1px solid #cfe5d6;border-radius:999px;background:#eef9f1;color:#08783b;padding:5px 8px;font-size:9px;font-weight:750}
.eb-master-results-wrap{overflow:auto;border:1px solid #e5eaf0;border-radius:14px;background:#fff}
.eb-master-results-table{width:100%;min-width:1320px;border-collapse:collapse}
.eb-master-results-table th{
  position:sticky;top:0;background:#f8fafc;color:#64748b;padding:10px 9px;border-bottom:1px solid #e5eaf0;
  text-align:left;font-size:9px;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap
}
.eb-master-results-table td{padding:11px 9px;border-bottom:1px solid #edf2ef;color:#334155;font-size:10px;vertical-align:top;line-height:1.35}
.eb-master-results-table tr:hover td{background:#fbfdfc}
.eb-master-symbol{color:#08783b;font-size:13px;font-weight:900}
.eb-master-sub{display:block;margin-top:2px;color:#94a3b8;font-size:9px;white-space:nowrap}
.eb-master-badges{display:flex;flex-wrap:wrap;gap:3px}
.eb-master-badge{display:inline-flex;padding:3px 5px;border-radius:999px;background:#eef2f6;color:#475569;font-size:8px;font-weight:800}
.eb-master-reasons{margin:0;padding-left:14px;min-width:170px;max-width:260px}
.eb-master-row-actions{display:flex;gap:4px;flex-wrap:wrap}
.eb-master-row-actions button{border:1px solid #dfe5eb;border-radius:7px;background:#f8fafc;padding:5px 6px;font-size:9px;font-weight:800;cursor:pointer}
.eb-master-state{padding:60px 22px;text-align:center;color:#64748b}
.eb-master-state strong{display:block;margin-bottom:5px;color:#0f172a;font-size:15px}
.eb-master-warning{padding:9px 11px;border:1px solid #f4dfaa;border-radius:10px;background:#fff8e8;color:#8a6112;font-size:10px;margin-bottom:10px}
.eb-master-toast{position:fixed;right:22px;bottom:95px;z-index:10020;display:none;max-width:320px;padding:10px 12px;border-radius:10px;background:#173527;color:#fff;font-size:11px;box-shadow:0 16px 40px rgba(15,23,42,.18)}
.eb-master-toast.show{display:block}
.eb-master-save-dialog{border:0;border-radius:16px;padding:0;width:min(430px,calc(100% - 24px));box-shadow:0 24px 80px rgba(15,23,42,.22)}
.eb-master-save-dialog::backdrop{background:rgba(15,23,42,.42)}
.eb-master-save-inner{padding:18px}
.eb-master-save-inner h3{margin:0 0 12px;color:#0f172a}
.eb-master-save-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:12px}

body.eb-master-filter-mode{--eb-sidebar:330px}
body.eb-master-filter-mode .eb-bottom-ai{left:calc(var(--eb-sidebar) + 28px)}

@media(max-width:900px){
  body.eb-master-filter-mode{--eb-sidebar:0px}
  .eb-master-side-switch.is-visible{display:grid}
  #ebMasterFiltersPanel.active{max-height:calc(100vh - 150px);overflow-y:auto;padding-bottom:12px}
  .eb-master-workspace-head{flex-direction:column}
  .eb-master-results-table{min-width:0}
  .eb-master-results-table thead{display:none}
  .eb-master-results-table,.eb-master-results-table tbody,.eb-master-results-table tr,.eb-master-results-table td{display:block;width:100%}
  .eb-master-results-table tr{padding:10px;border-bottom:1px solid #e5eaf0}
  .eb-master-results-table td{display:flex;justify-content:space-between;gap:14px;border:0;padding:4px 0}
  .eb-master-results-table td::before{content:attr(data-label);color:#94a3b8;font-size:8px;text-transform:uppercase;font-weight:850}
  .eb-master-results-table td[data-label="Why it matched"],.eb-master-results-table td[data-label="Actions"]{display:block}
  .eb-master-results-table td[data-label="Why it matched"]::before,.eb-master-results-table td[data-label="Actions"]::before{display:block;margin-bottom:5px}
}

/* Keep scanner actions out of the middle of the filter list. */
@media(min-width:901px){
  body.eb-master-filter-mode .eb-app-sidebar{
    display:flex !important;
    flex-direction:column;
    overflow:hidden !important;
    padding-bottom:14px !important;
  }

  body.eb-master-filter-mode .eb-app-sidebar-head{
    flex:0 0 auto;
  }

  body.eb-master-filter-mode #ebMasterSideSwitch{
    flex:0 0 auto;
  }

  body.eb-master-filter-mode #ebMasterFiltersPanel.active{
    display:flex;
    flex:1 1 auto;
    min-height:0;
    flex-direction:column;
    overflow:hidden;
  }

  body.eb-master-filter-mode .eb-master-filter-head,
  body.eb-master-filter-mode .eb-master-tabs{
    flex:0 0 auto;
  }

  body.eb-master-filter-mode .eb-master-panel.active{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    padding-right:4px;
  }

  body.eb-master-filter-mode .eb-master-actions{
    position:static;
    flex:0 0 auto;
    margin:8px 0 0;
    padding:10px 0 0;
    border-top:1px solid #e5eaf0;
    background:#fff;
  }

  /* Tools view uses the full sidebar as the scroll container. */
  body.eb-master-filter-mode.eb-master-tools-mode .eb-app-sidebar{
    overflow-y:auto !important;
    overflow-x:hidden !important;
  }

  body.eb-master-filter-mode.eb-master-tools-mode #ebAppNav{
    flex:0 0 auto;
    min-height:max-content;
  }
}

/* Master Scanner renders directly in the visible workspace stage. */
.eb-master-stage-panel[hidden]{display:none !important}
.eb-master-stage-panel{
  width:100%;
  min-height:calc(100vh - 195px);
  padding:22px;
  box-sizing:border-box;
  background:#fff;
}
@media(max-width:900px){
  .eb-master-stage-panel{padding:14px;min-height:calc(100vh - 220px)}
}


/* =========================================================
   Unified scanner workspace — Breakout / Pre-Breakout / Base
========================================================= */
.eb-master-close{
  width:38px !important;
  min-width:38px !important;
  padding:0 !important;
  border-radius:10px !important;
  font-size:22px !important;
  line-height:1 !important;
}
.eb-unified-scanner .scanner-layout{
  display:grid !important;
  grid-template-columns:minmax(230px,280px) minmax(0,1fr) minmax(220px,270px) !important;
  gap:14px !important;
  margin:0 !important;
  align-items:start !important;
}
.eb-unified-scanner .scanner-panel{
  padding:16px !important;
  border:1px solid #e5eaf0 !important;
  border-radius:14px !important;
  background:#fff !important;
  color:#334155 !important;
  box-shadow:none !important;
}
.eb-unified-scanner .scanner-panel:hover{
  border-color:#d9e5dd !important;
  box-shadow:none !important;
}
.eb-unified-scanner .scanner-panel h3{
  margin:0 0 12px !important;
  color:#0f172a !important;
  font-size:18px !important;
  letter-spacing:-.02em !important;
}
.eb-unified-scanner .filter-group{margin-bottom:10px !important}
.eb-unified-scanner .filter-group:after{display:none !important}
.eb-unified-scanner .filter-group label{
  margin-bottom:4px !important;
  color:#64748b !important;
  font-size:9px !important;
  letter-spacing:0 !important;
  text-transform:none !important;
}
.eb-unified-scanner .filter-group select{
  min-height:35px !important;
  height:35px !important;
  padding:5px 8px !important;
  border:1px solid #d6dee6 !important;
  border-radius:9px !important;
  background:#fff !important;
  color:#0f172a !important;
  font-size:10px !important;
}
.eb-unified-scanner .scanner-btn{
  min-height:38px !important;
  height:38px !important;
  margin-top:8px !important;
  border:1px solid #08783b !important;
  border-radius:10px !important;
  background:#08783b !important;
  color:#fff !important;
  font-size:11px !important;
  box-shadow:none !important;
}
.eb-unified-scanner .scanner-results{
  height:auto !important;
  min-height:480px !important;
  overflow:auto !important;
}
.eb-unified-scanner table{
  margin-top:10px !important;
  background:#fff !important;
}
.eb-unified-scanner table thead,
.eb-unified-scanner table thead th{
  background:#f8fafc !important;
}
.eb-unified-scanner table th{
  padding:10px 9px !important;
  border-bottom:1px solid #e5eaf0 !important;
  color:#64748b !important;
  font-size:9px !important;
}
.eb-unified-scanner table td{
  padding:11px 9px !important;
  border-bottom:1px solid #edf2ef !important;
  color:#334155 !important;
  font-size:10px !important;
}
.eb-unified-scanner table tbody tr:hover{background:#fbfdfc !important}
.eb-unified-scanner .metric{
  padding:10px 11px !important;
  border:1px solid #edf2ef !important;
  border-radius:10px !important;
  background:#fbfdfc !important;
}
.eb-unified-scanner .metric span{color:#64748b !important;font-size:9px !important}
.eb-unified-scanner .metric strong{color:#0f172a !important;font-size:15px !important}
.eb-legacy-basic{
  margin:0 0 13px;
  padding:11px;
  border:1px solid #e4ebe7;
  border-radius:12px;
  background:#fbfdfc;
}
.eb-legacy-basic-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:8px;
  margin-bottom:6px;
}
.eb-legacy-basic-head strong{color:#0f172a;font-size:11px}
.eb-legacy-basic-head span{color:#94a3b8;font-size:9px}
.eb-legacy-clear{
  width:100%;
  min-height:32px;
  margin-top:9px;
  border:1px solid #d6dee6;
  border-radius:9px;
  background:#fff;
  color:#64748b;
  font:inherit;
  font-size:9px;
  font-weight:800;
  cursor:pointer;
}
.eb-legacy-specific-label{
  margin:12px 0 10px;
  padding-top:10px;
  border-top:1px solid #edf2ef;
  color:#0f172a;
  font-size:10px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.eb-legacy-filter-count{
  margin:-5px 0 10px;
  color:#64748b;
  font-size:10px;
}
@media(max-width:1100px){
  .eb-unified-scanner .scanner-layout{
    grid-template-columns:240px minmax(0,1fr) !important;
  }
  .eb-unified-scanner .scanner-layout > .scanner-panel:last-child{
    grid-column:1 / -1 !important;
  }
}
@media(max-width:760px){
  .eb-unified-scanner .scanner-layout{display:block !important}
  .eb-unified-scanner .scanner-panel{margin-bottom:12px !important}
}


/* Master Scanner owns the workspace stage while active. */
#ebWorkspaceStage.eb-master-stage-active #ebWorkspaceEmpty,
#ebWorkspaceStage.eb-master-stage-active #ebWorkspaceWindow{
  display:none !important;
}
#ebWorkspaceStage.eb-master-stage-active #masterScannerWorkspace{
  display:block !important;
}


/* Featured Master Scanner navigation */
.eb-master-nav-featured{
  margin-bottom:12px !important;
  min-height:48px !important;
  border:1px solid #cfe5d6 !important;
  background:#f1fbf4 !important;
}
.eb-master-nav-featured .eb-app-nav-icon{
  color:#08783b !important;
  font-weight:900 !important;
}
.eb-master-nav-copy{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
}
.eb-master-nav-copy strong{
  color:#0f172a;
  font-size:13px;
  font-weight:900;
}
.eb-master-nav-copy small{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:3px 6px;
  border-radius:999px;
  background:#16a34a;
  color:#fff;
  font-size:8px;
  font-weight:900;
  letter-spacing:.05em;
}
.eb-master-nav-featured + .eb-app-nav-item{
  margin-top:5px;
}

/* EdgeBreak Free top-ranked-results notice */
.eb-master-free-notice{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:0 0 12px;
  padding:16px 18px;
  border:1px solid #cfe5d6;
  border-radius:14px;
  background:linear-gradient(135deg,#f1fbf4,#ffffff);
}
.eb-master-free-notice span{
  display:block;
  margin-bottom:4px;
  color:#16a34a;
  font-size:9px;
  font-weight:900;
  letter-spacing:.09em;
}
.eb-master-free-notice strong{
  display:block;
  color:#0f172a;
  font-size:15px;
  font-weight:900;
}
.eb-master-free-notice p{
  margin:5px 0 0;
  max-width:720px;
  color:#64748b;
  font-size:10px;
  line-height:1.55;
}
.eb-master-free-cta{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  flex:0 0 auto;
}
.eb-master-free-cta a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 11px;
  border:1px solid #cbd5e1;
  border-radius:9px;
  background:#fff;
  color:#334155;
  text-decoration:none;
  font-size:10px;
  font-weight:850;
}
.eb-master-free-cta a.primary{
  border-color:#08783b;
  background:#08783b;
  color:#fff;
}
.eb-master-rank{
  color:#08783b;
  font-weight:900;
}
@media(max-width:760px){
  .eb-master-free-notice{align-items:flex-start;flex-direction:column}
  .eb-master-free-cta{width:100%}
  .eb-master-free-cta a{flex:1}
}

/* EdgeBreak Free: preview premium PBI and off-exchange filters without enabling them. */
.eb-free-premium-section{margin:8px -8px;padding:12px 8px;border:1px solid #dce8df;border-radius:12px;background:linear-gradient(145deg,#f7fbf8,#fff)}
.eb-free-premium-filter select:disabled,.eb-free-premium-filter input:disabled{border-color:#dfe5eb;background:#f8fafc;color:#94a3b8;cursor:not-allowed;opacity:1}
.eb-free-premium-filter label::after{content:"  🔒";color:#16a34a}
.eb-free-off-exchange-callout,.eb-free-pbi-callout{display:grid;gap:8px;margin-top:10px;padding:10px;border:1px solid #cfe5d6;border-radius:10px;background:#eef9f1}
.eb-free-off-exchange-callout strong,.eb-free-pbi-callout strong{display:block;color:#0f172a;font-size:10px}
.eb-free-off-exchange-callout span,.eb-free-pbi-callout span{display:block;margin-top:3px;color:#64748b;font-size:9px;line-height:1.45}
.eb-free-off-exchange-callout a,.eb-free-pbi-callout a{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:0 10px;border-radius:8px;background:#08783b;color:#fff;font-size:9px;font-weight:850;text-decoration:none}
.eb-master-premium-cell{display:inline-flex;align-items:center;gap:4px;color:#08783b;font-weight:900;white-space:nowrap}

.eb-free-body .eb-master-pbi-section h4::after{content:" 🔒";color:#08783b}
