:root {
    --bg: #f3f6fb;
    --card: #ffffff;
    --text: #111827;
    --muted: #667085;
    --border: #d9e2ef;
    --soft: #f8fafc;
    --green: #039855;
    --red: #d92d20;
    --blue: #155eef;
    --blue-soft: #eff4ff;
    --orange: #f79009;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}
.app-shell {
    width: min(98%, 1680px);
    margin: 0 auto;
    padding: 12px 0 26px;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 10px 32px rgba(16, 24, 40, 0.07);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #e7f8ef;
    color: var(--green);
    font-weight: 900;
}
h1 { margin: 0; font-size: clamp(22px, 3vw, 34px); letter-spacing: -0.03em; }
.brand p { margin: 3px 0 0; color: var(--muted); }
.clock-card {
    text-align: right;
    min-width: 220px;
    border: 1px solid var(--border);
    background: var(--soft);
    border-radius: 14px;
    padding: 10px 12px;
}
.clock-card strong { display: block; color: var(--blue); font-size: 18px; }
.clock-card small { color: var(--muted); }

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.notification-center { position: relative; }
.notification-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--soft);
    cursor: pointer;
    font-size: 19px;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 18px rgba(16,24,40,0.05);
}
.notification-toggle:hover { border-color: #b4c6e8; background: #eef4ff; }
.notification-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--red);
    color: white;
    font-size: 11px;
    font-weight: 900;
    display: grid;
    place-items: center;
    border: 2px solid white;
}
.notification-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(430px, 92vw);
    max-height: 70vh;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 18px 55px rgba(16,24,40,0.18);
    z-index: 80;
    overflow: hidden;
}
.notification-panel-head {
    padding: 13px 15px;
    background: linear-gradient(135deg, #eff4ff, #ffffff);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}
.notification-panel-head strong { font-size: 16px; }
.notification-panel-head small { color: var(--muted); font-size: 12px; text-align: right; }
.notification-list {
    max-height: calc(70vh - 55px);
    overflow-y: auto;
    padding: 8px;
}
.notification-section-title {
    padding: 9px 8px 5px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #475467;
    font-weight: 900;
}
.notification-item {
    width: 100%;
    border: 1px solid #edf2f7;
    background: #fff;
    border-radius: 12px;
    padding: 9px 10px;
    margin-bottom: 7px;
    display: grid;
    grid-template-columns: 10px 1fr auto;
    gap: 8px;
    align-items: center;
    text-align: left;
    cursor: pointer;
}
.notification-item:hover { border-color: #b4c6e8; background: #f8fbff; }
.notification-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.notif-fresh .notification-dot { background: var(--orange); box-shadow: 0 0 0 4px rgba(247,144,9,.14); }
.notif-strict .notification-dot { background: var(--green); }
.notification-main strong { display: block; font-size: 13px; color: var(--text); }
.notification-main em {
    font-style: normal;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--blue);
    margin-left: 5px;
}
.notif-fresh .notification-main em { background: #fff7ed; color: #c2410c; }
.notif-strict .notification-main em { background: #ecfdf3; color: var(--green); }
.notification-main small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.notification-price { font-weight: 900; font-size: 13px; color: var(--text); }
.notification-system {
    border: 1px dashed #f6c6c1;
    background: #fff5f4;
    border-radius: 12px;
    padding: 9px 10px;
    margin-bottom: 7px;
}
.notification-system strong { display: block; color: var(--red); font-size: 13px; }
.notification-system small { display: block; color: #7a271a; margin-top: 3px; }
.notification-empty, .notification-more {
    padding: 12px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-top: 12px;
    box-shadow: 0 8px 28px rgba(16, 24, 40, 0.06);
}
.filter-strip { padding: 14px 16px; }
.chip-row {
    display: flex;
    gap: 9px;
    align-items: stretch;
    flex-wrap: wrap;
}
.chip-input {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 10px;
    font-size: 13px;
    color: #344054;
    font-weight: 700;
}
.chip-input span { display: inline-flex; align-items: center; gap: 5px; }
.chip-input input, .chip-input select {
    border: 0;
    outline: 0;
    background: var(--soft);
    border-radius: 8px;
    padding: 8px;
    font-size: 13px;
    min-width: 70px;
    color: var(--text);
}
.chip-input select { min-width: 130px; }
.symbols-box { margin-top: 12px; }
.symbols-box summary { cursor: pointer; font-weight: 800; color: #344054; }
textarea {
    width: 100%;
    min-height: 160px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    resize: vertical;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
}
.hint { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
button {
    border: 0;
    border-radius: 10px;
    padding: 10px 17px;
    background: var(--blue);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}
button.secondary { background: #eef2f7; color: #101828; }
button:disabled { opacity: .6; cursor: wait; }
.summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.metric {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
}
.metric strong { display: block; font-size: 22px; line-height: 1.2; }
.metric span { color: var(--muted); font-size: 12px; }
.metric.wide strong { font-size: 15px; }
.result-card { overflow: hidden; }
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
h2 { margin: 0; font-size: 18px; }
#viewMessage { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.loading { color: var(--blue); font-weight: 900; }
.hidden { display: none; }
.table-wrap { width: 100%; overflow: auto; max-height: calc(100vh - 310px); }
table {
    width: 100%;
    min-width: 1550px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12.5px;
}
th, td {
    border-bottom: 1px solid var(--border);
    padding: 9px 10px;
    text-align: left;
    vertical-align: middle;
    background: #fff;
}
th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    color: #475467;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 800;
}
tr:hover td { background: #fbfdff; }
.strict-row td { background: #fcfffd; }
.num { text-align: right; white-space: nowrap; }
.sticky-col {
    position: sticky;
    left: 0;
    z-index: 3;
    box-shadow: 1px 0 0 var(--border);
}
td.sticky-col { z-index: 1; }
.symbol-cell strong { display: block; font-size: 13px; color: #101828; }
.symbol-cell small { color: var(--muted); }
.company-cell { min-width: 220px; max-width: 260px; }
.price-cell strong { font-size: 13px; }
.positive { color: var(--green); font-weight: 900; }
.negative { color: var(--red); font-weight: 900; }
.relvol {
    display: inline-block;
    background: #ecfdf3;
    color: var(--green);
    border: 1px solid #abefc6;
    border-radius: 999px;
    padding: 3px 8px;
    font-weight: 900;
}
.signal-cell { min-width: 210px; }
.score {
    display: inline-block;
    margin-right: 6px;
    border-radius: 999px;
    padding: 4px 8px;
    background: #fff7ed;
    color: #b54708;
    border: 1px solid #fedf89;
    font-weight: 900;
}
.score-ok { background: #ecfdf3; color: var(--green); border-color: #abefc6; }
.cond {
    display: inline-block;
    margin: 2px 3px 2px 0;
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 11px;
    border: 1px solid var(--border);
    color: var(--muted);
    background: var(--soft);
}
.cond.ok { color: var(--green); background: #ecfdf3; border-color: #abefc6; }
.cond.fail { color: var(--red); background: #fef3f2; border-color: #fecdca; }
.signal-cell small { display: block; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.reason { min-width: 260px; max-width: 330px; color: #344054; }
.reason ul { margin: 0; padding-left: 16px; }
.links { white-space: nowrap; }
.links a {
    display: inline-block;
    margin: 0 5px 5px 0;
    color: var(--blue);
    background: var(--blue-soft);
    border: 1px solid #c7d7fe;
    border-radius: 8px;
    padding: 5px 7px;
    font-weight: 900;
    text-decoration: none;
}
.empty { text-align: center; color: var(--muted); padding: 28px; }
footer { color: var(--muted); text-align: center; font-size: 12px; margin-top: 14px; padding-bottom: 10px; }


.alert-btn { background: #039855; }
.alert-settings {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 10px;
    padding: 9px 10px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: #fbfdff;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}
.alert-settings label { display: inline-flex; align-items: center; gap: 6px; }
#alertStatus {
    margin-left: auto;
    color: var(--muted);
    font-weight: 800;
}
#alertStatus.on { color: var(--green); }
#alertStatus.blocked { color: var(--red); }
.toast-box {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;
    display: grid;
    gap: 10px;
    max-width: min(420px, calc(100vw - 30px));
}
.toast {
    border: 1px solid #abefc6;
    border-left: 5px solid var(--green);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 42px rgba(16, 24, 40, .16);
    padding: 12px 14px;
    color: #101828;
}
.toast strong { display: block; margin-bottom: 3px; }
.toast small { color: var(--muted); line-height: 1.4; }
.toast button {
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
}

@media (max-width: 1100px) {
    .topbar { flex-direction: column; align-items: stretch; }
    .header-right { width: 100%; justify-content: space-between; }
    .clock-card { text-align: left; flex: 1; }
    .notification-panel { right: auto; left: 0; width: min(92vw, 430px); }
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .table-wrap { max-height: none; }
}
@media (max-width: 620px) {
    .app-shell { width: 100%; padding: 8px; }
    .chip-input { width: 100%; justify-content: space-between; }
    .chip-input select { min-width: 160px; }
    .summary-grid { grid-template-columns: 1fr; }
    button { flex: 1; }
}
@media print {
    body { background: #fff; }
    .filter-strip, footer, .clock-card, .links, .actions { display: none !important; }
    .app-shell { width: 100%; }
    .topbar, .card, .metric { box-shadow: none; border: 1px solid #ccc; }
    .table-wrap { max-height: none; overflow: visible; }
    table { min-width: 100%; font-size: 9px; }
    th, td { padding: 5px; }
    .sticky-col { position: static; box-shadow: none; }
}
.watchlist-toggle{display:inline-flex;align-items:center;gap:8px;margin-top:8px;font-size:13px;color:#22304a;font-weight:700}
.watchlist-toggle input{width:auto}

.page-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0 0;
}
.page-tabs a {
    text-decoration: none;
    border: 1px solid var(--border);
    background: #fff;
    color: #344054;
    border-radius: 999px;
    padding: 9px 14px;
    font-weight: 900;
    box-shadow: 0 5px 18px rgba(16, 24, 40, 0.05);
}
.page-tabs a.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}
.search-chip input[type="search"] {
    min-width: 220px;
}
@media (max-width: 720px) {
    .search-chip input[type="search"] { min-width: 150px; }
    .page-tabs a { width: 100%; text-align: center; }
}

.symbol-link{display:flex;flex-direction:column;gap:2px;text-decoration:none;color:#0f172a}
.symbol-link strong{color:#0f172a}
.symbol-link small{color:#2563eb;font-weight:700}
.symbol-link:hover strong,.symbol-link:hover small{text-decoration:underline}

.details-btn {
    display: inline-block;
    margin: 0 5px 5px 0;
    color: #101828;
    background: #fff7ed;
    border: 1px solid #fedf89;
    border-radius: 8px;
    padding: 5px 8px;
    font-weight: 900;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
}
.details-btn:hover { background: #fffaeb; }
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .52);
    z-index: 9997;
}
.stock-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(520px, 96vw);
    height: 100vh;
    background: #fff;
    border-left: 1px solid var(--border);
    box-shadow: -18px 0 55px rgba(15, 23, 42, .22);
    z-index: 9998;
    transform: translateX(105%);
    transition: transform .22s ease;
    display: flex;
    flex-direction: column;
}
.stock-drawer.open { transform: translateX(0); }
.drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--border);
    background: #fbfdff;
}
.drawer-head small,
.drawer-card small {
    display: block;
    color: #475467;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    margin-bottom: 6px;
}
.drawer-head h3 {
    margin: 0;
    color: #101828;
    font-size: 24px;
    line-height: 1.1;
}
.drawer-head p { margin: 5px 0 0; color: var(--muted); font-weight: 700; }
.drawer-close {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 999px;
    background: #fff;
    color: #101828;
    border: 1px solid var(--border);
    font-size: 24px;
    line-height: 1;
}
.drawer-content {
    overflow-y: auto;
    padding: 14px 16px 22px;
    display: grid;
    gap: 12px;
}
.drawer-card,
.drawer-metric {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 14px;
    padding: 12px;
}
.company-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.company-card h4 { margin: 0 0 5px; font-size: 15px; }
.company-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.company-sector { font-weight: 800; color: #344054 !important; margin-bottom: 7px !important; }
.company-desc { font-size: 13px; color: #475467 !important; max-width: 100%; }
.company-card > span {
    border: 1px solid #abefc6;
    background: #ecfdf3;
    color: var(--green);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}
.drawer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.drawer-metric span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 7px;
}
.drawer-metric strong { font-size: 16px; color: #101828; }
.drawer-metric.big strong { font-size: 21px; }
.signal-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.signal-line > strong {
    background: #eff4ff;
    color: var(--blue);
    border-radius: 999px;
    padding: 6px 10px;
}
.drawer-positive { color: var(--green); font-weight: 900; }
.drawer-warning { color: #b54708; font-weight: 900; }
.drawer-conditions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}
.drawer-condition {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 9px;
    background: var(--soft);
}
.drawer-condition span {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 900;
}
.drawer-condition.ok span { background: #ecfdf3; color: var(--green); }
.drawer-condition.fail span { background: #fef3f2; color: var(--red); }
.drawer-condition p { margin: 0; color: #344054; font-weight: 800; }
.drawer-reasons { margin: 0; padding-left: 18px; color: #344054; line-height: 1.55; }
.drawer-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
}
.drawer-info-row:last-child { border-bottom: 0; }
.drawer-info-row span { color: var(--muted); font-weight: 800; }
.drawer-info-row strong { text-align: right; color: #101828; }
.drawer-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
}
.drawer-links a {
    display: block;
    text-align: center;
    text-decoration: none;
    background: var(--blue);
    color: #fff;
    border-radius: 11px;
    padding: 11px 12px;
    font-weight: 900;
}
.drawer-links a:nth-child(2),
.drawer-links a:nth-child(3) {
    background: #eef2f7;
    color: #101828;
}
body.drawer-open { overflow: hidden; }
@media (max-width: 620px) {
    .stock-drawer { width: 100vw; }
    .drawer-grid { grid-template-columns: 1fr; }
}
@media print {
    .stock-drawer, .drawer-backdrop { display: none !important; }
}

.trade-plan-card { border-left: 4px solid #155eef; }
.intraday-card { border-left-color: #f79009; }
.swing-card { border-left-color: #039855; }
.trade-level-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 8px;
}
.trade-level-grid > div {
    border: 1px solid var(--border);
    background: #fbfdff;
    border-radius: 11px;
    padding: 9px 10px;
}
.trade-level-grid span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 5px;
}
.trade-level-grid strong { color: #101828; font-size: 15px; }
.drawer-red { color: var(--red) !important; }
.drawer-blue { color: var(--blue) !important; }
.trade-note {
    margin: 10px 0 0;
    color: #344054;
    line-height: 1.5;
    font-size: 13px;
}
.trade-note strong { color: #101828; }
@media (max-width: 620px) {
    .trade-level-grid { grid-template-columns: 1fr; }
}

.override-chip {
    min-width: 190px;
    background: #fff7ed;
    border-color: #fed7aa;
}
.toggle-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: #9a3412;
}
.toggle-line input {
    width: 16px;
    height: 16px;
}
body.drawer-open {
    overflow: hidden;
}

.catalyst-card { border-left: 4px solid #7c3aed; }
.catalyst-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.catalyst-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}
.mini-btn {
    border: 1px solid var(--border);
    background: #f8fafc;
    color: #101828;
    border-radius: 9px;
    padding: 7px 10px;
    font-weight: 900;
    cursor: pointer;
}
.mini-btn:hover { background: #eef2f7; }
.catalyst-loading,
.catalyst-empty {
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: 11px;
    padding: 12px;
    color: #475467;
    font-weight: 700;
    line-height: 1.45;
}
.catalyst-summary {
    margin: 0 0 10px;
    color: #475467;
    font-size: 12px;
    line-height: 1.45;
}
.catalyst-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
}
.catalyst-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}
.catalyst-item.up { border-left: 4px solid var(--green); }
.catalyst-item.down { border-left: 4px solid var(--red); }
.catalyst-item.neutral { border-left: 4px solid #98a2b3; }
.catalyst-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
}
.catalyst-title-row span:last-child {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-align: right;
}
.catalyst-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.catalyst-badge.up { background: #ecfdf3; color: var(--green); }
.catalyst-badge.down { background: #fef3f2; color: var(--red); }
.catalyst-badge.neutral { background: #f2f4f7; color: #475467; }
.catalyst-item a {
    display: block;
    color: #155eef;
    text-decoration: none;
    font-weight: 900;
    line-height: 1.35;
}
.catalyst-item a:hover { text-decoration: underline; }
.catalyst-item p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.catalyst-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.catalyst-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #eef4ff;
    color: #155eef;
    text-decoration: none;
    padding: 8px 10px;
    font-weight: 900;
    font-size: 12px;
}

.rating-cell { min-width: 150px; }
.rating-mini { display:flex; flex-direction:column; gap:4px; align-items:flex-start; }
.rating-mini small { color:#526078; font-weight:700; line-height:1.25; }
.rating-card { border-left:4px solid #2563eb; }
.rating-summary { display:grid; grid-template-columns:1fr 1.4fr; gap:10px; margin:10px 0; }
.rating-summary > div { background:#f8fafc; border:1px solid #e2e8f0; border-radius:14px; padding:12px; }
.rating-summary strong { display:block; font-size:20px; color:#0f172a; }
.rating-summary span { font-size:11px; color:#64748b; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.rating-use-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:10px 0; }
.rating-use-grid > div { border:1px solid #e5e7eb; border-radius:12px; padding:10px; background:#fff; }
.rating-use-grid span:first-child { display:block; font-size:11px; font-weight:900; color:#64748b; margin-bottom:6px; text-transform:uppercase; }
.rating-pill { display:inline-flex; align-items:center; border-radius:999px; padding:5px 8px; font-size:11px; font-weight:900; white-space:nowrap; }
.rating-pill.good { background:#dcfce7; color:#166534; border:1px solid #86efac; }
.rating-pill.avg { background:#fef9c3; color:#854d0e; border:1px solid #fde68a; }
.rating-pill.wait { background:#fee2e2; color:#991b1b; border:1px solid #fecaca; }
.rating-factor-box { display:grid; gap:8px; margin:10px 0; }
.factor-line { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:8px 0; border-bottom:1px dashed #e5e7eb; }
.factor-line span:first-child { font-weight:800; color:#334155; }
.fundamental-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:12px 0; }
.fundamental-grid > div { background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; padding:9px; }
.fundamental-grid span { display:block; font-size:10px; color:#64748b; font-weight:900; text-transform:uppercase; }
.fundamental-grid strong { display:block; margin-top:4px; color:#0f172a; }
.rating-reasons { margin:8px 0 0; padding-left:18px; color:#334155; line-height:1.55; }
.rating-disclaimer { margin:10px 0 0; color:#64748b; font-size:12px; font-weight:700; }
@media (max-width: 720px) {
  .rating-summary, .rating-use-grid, .fundamental-grid { grid-template-columns:1fr; }
}

/* Open-price breakout notification panel */
.open-breakout-panel {
    margin-top: 14px;
    border: 1px solid #c7d2fe;
    background: linear-gradient(135deg, #eef4ff 0%, #ffffff 62%);
}
.breakout-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.breakout-title strong {
    color: #172554;
    font-size: 15px;
}
.breakout-title span {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}
.breakout-meta {
    color: #526078;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.45;
}
.breakout-empty {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}
.breakout-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
}
.breakout-item {
    position: relative;
    border: 1px solid #dbeafe;
    background: #fff;
    border-radius: 14px;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.breakout-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, .12);
    border-color: #93c5fd;
}
.breakout-item strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
}
.breakout-item span {
    display: inline-block;
    margin-top: 4px;
    color: #166534;
    font-size: 15px;
    font-weight: 900;
}
.breakout-item small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}
.breakout-item em {
    position: absolute;
    right: 8px;
    top: 8px;
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    animation: pulseBadge 1s ease-in-out infinite;
}
.breakout-item.fresh {
    border-color: #ef4444;
    background: #fff7ed;
}
.open-breakout-row .symbol-cell {
    box-shadow: inset 3px 0 0 #2563eb;
}
.new-breakout-row {
    animation: rowFlash 2.2s ease-in-out 2;
}
.price-cell.flash-price strong {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 10px;
    background: #22c55e;
    color: #fff;
    animation: priceFlash 1s ease-in-out infinite;
}
.flash-badge, .open-bo-badge, .open-breakout-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 10px;
    font-weight: 900;
    margin-top: 3px;
    white-space: nowrap;
}
.flash-badge, .open-breakout-chip.new {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.open-bo-badge, .open-breakout-chip {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.open-breakout-chip { margin: 0 4px 4px 0; }
.open-breakout-card { border-left: 4px solid #2563eb; }
@keyframes priceFlash {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.06); filter: brightness(1.18); }
}
@keyframes rowFlash {
    0% { background: #fff7ed; }
    50% { background: #fef3c7; }
    100% { background: transparent; }
}
@keyframes pulseBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
@media (max-width: 720px) {
    .breakout-title { align-items: flex-start; flex-direction: column; }
    .breakout-list { grid-template-columns: 1fr; }
}

.details-cell { white-space: nowrap; text-align: center; }
.details-cell .details-btn { padding: 7px 12px; border-radius: 999px; }

/* Compact result layout: no inner horizontal/vertical scrolling, 20 rows handled by pagination */
.table-wrap {
    overflow-x: visible;
    overflow-y: visible;
    max-height: none;
}
.compact-results-table,
#resultsTable {
    min-width: 0 !important;
    width: 100%;
    table-layout: fixed;
    font-size: 11.5px;
}
.compact-results-table th,
.compact-results-table td,
#resultsTable th,
#resultsTable td {
    padding: 8px 7px;
    white-space: normal;
    word-break: normal;
}
.compact-results-table th:nth-child(1), #resultsTable th:nth-child(1) { width: 7%; }
.compact-results-table th:nth-child(2), #resultsTable th:nth-child(2) { width: 15%; }
.compact-results-table th:nth-child(3), #resultsTable th:nth-child(3) { width: 6%; }
.compact-results-table th:nth-child(4), #resultsTable th:nth-child(4) { width: 7%; }
.compact-results-table th:nth-child(5), #resultsTable th:nth-child(5) { width: 9%; }
.compact-results-table th:nth-child(6), #resultsTable th:nth-child(6) { width: 9%; }
.compact-results-table th:nth-child(7), #resultsTable th:nth-child(7) { width: 10%; }
.compact-results-table th:nth-child(8), #resultsTable th:nth-child(8) { width: 12%; }
.compact-results-table th:nth-child(9), #resultsTable th:nth-child(9) { width: 14%; }
.compact-results-table th:nth-child(10), #resultsTable th:nth-child(10) { width: 7%; }
.compact-results-table th:nth-child(11), #resultsTable th:nth-child(11) { width: 4%; }

.company-cell { min-width: 0; max-width: none; }
.company-cell strong { display:block; line-height:1.25; }
.company-cell small { display:block; color: var(--muted); margin-top:3px; line-height:1.25; }
.symbol-cell strong { font-size: 12px; }
.symbol-cell small { font-size: 10.5px; }
.details-btn { padding: 6px 8px; font-size: 11px; }
.price-cell strong { font-size: 12px; }
.movement-stack,
.volume-stack,
.level-stack { line-height: 1.45; }
.movement-stack b,
.level-stack b { color:#667085; font-weight:900; }
.volume-stack strong { display:block; }
.volume-stack small { display:block; color: var(--muted); margin-top:2px; }
.volume-cell .relvol { padding: 2px 6px; font-size: 11px; margin-top: 2px; }
.levels-cell { font-size: 11px; }
.signal-cell { min-width: 0; }
.signal-compact .score { margin-bottom: 3px; }
.signal-compact .cond { font-size: 10px; padding: 1px 5px; margin: 1px 2px 1px 0; }
.signal-compact ul { margin: 3px 0 0; padding-left: 14px; color: #344054; line-height: 1.35; }
.signal-compact li { margin-bottom: 1px; }
.rating-cell { min-width: 0; }
.rating-mini { max-width: 100%; }
.rating-pill { font-size: 10px; padding: 3px 6px; }
.compact-links a { display:block; text-align:center; padding: 4px 5px; margin: 0 0 4px; }
.pagination-box {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    padding: 12px 16px;
    border-top:1px solid var(--border);
    background:#fff;
    color: var(--muted);
    font-size:12px;
}
.page-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.page-btn {
    border:1px solid var(--border);
    background:#f8fafc;
    color:#344054;
    border-radius:8px;
    padding:6px 9px;
    font-weight:800;
    cursor:pointer;
}
.page-btn.active { background: var(--blue); color:#fff; border-color: var(--blue); }
.page-dots { color: var(--muted); padding: 0 2px; }

@media (max-width: 1100px) {
    .compact-results-table, #resultsTable { font-size: 10.5px; }
    .compact-results-table th:nth-child(7), #resultsTable th:nth-child(7),
    .compact-results-table td:nth-child(7), #resultsTable td:nth-child(7) { display:none; }
    .compact-results-table th:nth-child(10), #resultsTable th:nth-child(10),
    .compact-results-table td:nth-child(10), #resultsTable td:nth-child(10) { display:none; }
}
@media (max-width: 760px) {
    .compact-results-table th:nth-child(6), #resultsTable th:nth-child(6),
    .compact-results-table td:nth-child(6), #resultsTable td:nth-child(6),
    .compact-results-table th:nth-child(8), #resultsTable th:nth-child(8),
    .compact-results-table td:nth-child(8), #resultsTable td:nth-child(8) { display:none; }
    .pagination-box { flex-direction:column; align-items:flex-start; }
}

.rsi-vwap-cell{min-width:95px}
.rsi-vwap-stack{display:flex;flex-direction:column;gap:2px;font-size:12px;line-height:1.25}
.rsi-vwap-stack small{font-size:10px;color:#64748b}
.rsi-ok{color:#059669;font-weight:800}
.rsi-hot{color:#dc2626;font-weight:800}
.rsi-weak{color:#ea580c;font-weight:800}
.vwap-above{color:#059669;font-weight:800}
.vwap-below{color:#dc2626;font-weight:800}


/* Mobile-first result cards and compact controls */
@media (max-width: 760px) {
    body { background: #eef3fa; }
    .app-shell { width: 100%; padding: 8px; }
    .topbar { border-radius: 14px; padding: 12px; gap: 10px; }
    .brand { align-items: flex-start; }
    .logo-mark { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto; }
    h1 { font-size: 23px; line-height: 1.05; }
    .brand p { font-size: 12px; line-height: 1.35; }
    .header-right { gap: 8px; align-items: stretch; }
    .clock-card { min-width: 0; padding: 8px 10px; }
    .clock-card strong { font-size: 15px; }
    .notification-toggle { width: 42px; height: 42px; border-radius: 12px; }
    .notification-panel {
        position: fixed;
        top: 74px;
        left: 8px;
        right: 8px;
        width: auto;
        max-height: calc(100vh - 92px);
        border-radius: 14px;
    }

    .page-tabs { display: grid; grid-template-columns: 1fr; gap: 7px; }
    .page-tabs a { width: 100%; text-align: center; padding: 10px 12px; }

    .card { border-radius: 14px; margin-top: 10px; }
    .filter-strip { padding: 12px; }
    .chip-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .chip-input { width: 100%; min-height: 40px; padding: 7px 8px; font-size: 12px; }
    .chip-input input,
    .chip-input select,
    .search-chip input[type="search"] { min-width: 0; width: 100%; font-size: 12px; padding: 7px; }
    .chip-input.search-chip,
    .chip-input.override-chip { grid-column: 1 / -1; }
    .override-chip { justify-content: flex-start; gap: 10px; }
    textarea { min-height: 110px; font-size: 12px; }
    .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .actions button { width: 100%; min-height: 42px; padding: 9px 8px; font-size: 12px; }
    .alert-settings { font-size: 12px; gap: 8px; }
    #alertStatus { margin-left: 0; width: 100%; }

    .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .metric { padding: 10px; border-radius: 12px; }
    .metric strong { font-size: 18px; word-break: break-word; }
    .metric span { font-size: 11px; }
    .metric.wide { grid-column: 1 / -1; }
    .metric.wide strong { font-size: 12px; }

    .result-header { padding: 12px; display: block; }
    h2 { font-size: 16px; }
    #viewMessage { font-size: 12px; }
    .table-wrap { overflow: visible; }

    #resultsTable,
    #resultsTable thead,
    #resultsTable tbody,
    #resultsTable th,
    #resultsTable td,
    #resultsTable tr,
    .compact-results-table,
    .compact-results-table thead,
    .compact-results-table tbody,
    .compact-results-table th,
    .compact-results-table td,
    .compact-results-table tr { display: block; width: 100%; }

    #resultsTable thead,
    .compact-results-table thead { display: none; }

    #resultsTable tbody,
    .compact-results-table tbody { display: grid; gap: 10px; padding: 10px; }

    #resultsTable tr,
    .compact-results-table tr {
        border: 1px solid var(--border);
        border-radius: 15px;
        background: #fff;
        box-shadow: 0 8px 22px rgba(16, 24, 40, .07);
        overflow: hidden;
    }
    #resultsTable tr.strict-row,
    .compact-results-table tr.strict-row { border-left: 4px solid var(--green); }
    #resultsTable tr.new-breakout-row,
    .compact-results-table tr.new-breakout-row { border-left: 4px solid var(--orange); }

    #resultsTable td,
    .compact-results-table td {
        display: flex !important;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 1px solid #eef2f7;
        padding: 9px 11px;
        min-height: 38px;
        background: #fff;
        text-align: right;
        font-size: 12px;
    }
    #resultsTable td:last-child,
    .compact-results-table td:last-child { border-bottom: 0; }
    #resultsTable td::before,
    .compact-results-table td::before {
        content: '';
        flex: 0 0 90px;
        color: #667085;
        font-weight: 900;
        text-align: left;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: .03em;
    }
    #resultsTable td:nth-child(1)::before { content: 'Stock'; }
    #resultsTable td:nth-child(2)::before { content: 'Company'; }
    #resultsTable td:nth-child(3)::before { content: 'Details'; }
    #resultsTable td:nth-child(4)::before { content: 'Price'; }
    #resultsTable td:nth-child(5)::before { content: 'Move'; }
    #resultsTable td:nth-child(6)::before { content: 'Volume'; }
    #resultsTable td:nth-child(7)::before { content: 'RSI / VWAP'; }
    #resultsTable td:nth-child(8)::before { content: 'Levels'; }
    #resultsTable td:nth-child(9)::before { content: 'Signal'; }
    #resultsTable td:nth-child(10)::before { content: 'Rating'; }
    #resultsTable td:nth-child(11)::before { content: 'Links'; }

    .sticky-col,
    td.sticky-col { position: static !important; left: auto; box-shadow: none; z-index: auto; }
    .symbol-cell,
    .company-cell,
    .details-cell,
    .price-cell,
    .movement-cell,
    .volume-cell,
    .rsi-vwap-cell,
    .levels-cell,
    .signal-cell,
    .rating-cell,
    .links { min-width: 0 !important; max-width: none !important; }
    .symbol-cell .symbol-link { align-items: flex-end; text-align: right; }
    .symbol-cell strong { font-size: 15px; }
    .company-cell { text-align: right; display: block !important; }
    .company-cell::before { float: left; }
    .company-cell strong { font-size: 12px; }
    .details-cell { justify-content: space-between; }
    .details-btn { width: auto; min-width: 96px; padding: 7px 10px; }
    .price-cell strong { font-size: 15px; }
    .movement-stack,
    .volume-stack,
    .rsi-vwap-stack,
    .level-stack,
    .signal-compact,
    .rating-mini { align-items: flex-end; text-align: right; }
    .signal-compact ul { list-style-position: inside; padding-left: 0; text-align: right; }
    .cond-line { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; }
    .compact-links { display: flex !important; justify-content: flex-end; flex-wrap: wrap; }
    .compact-links::before { margin-right: auto; }
    .compact-links a { display: inline-flex; margin: 0 0 0 5px; padding: 6px 9px; }
    .empty { display: block !important; text-align: center; padding: 18px; }
    .empty::before { display: none; }

    .pagination-box { flex-direction: column; align-items: stretch; padding: 10px 12px; }
    .page-actions { justify-content: center; gap: 5px; }
    .page-btn { padding: 7px 9px; min-width: 40px; }

    .stock-drawer { width: 100vw; max-width: 100vw; }
    .drawer-head { padding: 14px; }
    .drawer-head h3 { font-size: 21px; }
    .drawer-content { padding: 12px; gap: 10px; }
    .drawer-grid,
    .trade-grid,
    .rating-summary,
    .rating-use-grid,
    .fundamental-grid { grid-template-columns: 1fr !important; }
    .company-card { flex-direction: column; }
    .catalyst-title-row { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 430px) {
    .chip-row { grid-template-columns: 1fr; }
    .summary-grid { grid-template-columns: 1fr; }
    .actions { grid-template-columns: 1fr; }
    #resultsTable td::before,
    .compact-results-table td::before { flex-basis: 78px; font-size: 10px; }
    #resultsTable td,
    .compact-results-table td { gap: 8px; padding: 8px 10px; }
}

/* Latest news and bullish sector pages */
.news-list-page,
.sector-list-page {
    display: grid;
    gap: 12px;
}
.news-card,
.sector-card {
    border: 1px solid var(--line, #dbe5f0);
    border-radius: 16px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}
.news-card.good { border-left: 5px solid #16a34a; }
.news-card.bad { border-left: 5px solid #dc2626; }
.news-card.neutral { border-left: 5px solid #64748b; }
.news-card-top,
.news-meta,
.sector-title,
.sector-stocks {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.news-card h3,
.sector-card h3 {
    margin: 8px 0;
    font-size: 16px;
    line-height: 1.35;
}
.news-card h3 a,
.news-meta a,
.sector-stocks a {
    color: #0f4fb8;
    text-decoration: none;
    font-weight: 800;
}
.news-card p {
    margin: 0 0 10px;
    color: #475569;
    line-height: 1.5;
}
.news-meta {
    color: #64748b;
    font-size: 12px;
    border-top: 1px dashed #e2e8f0;
    padding-top: 8px;
}
.mini-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 900;
    background: #e2e8f0;
    color: #334155;
}
.mini-badge.good { background: #dcfce7; color: #15803d; }
.mini-badge.bad { background: #fee2e2; color: #b91c1c; }
.mini-badge.neutral { background: #e2e8f0; color: #334155; }
.sector-card {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    align-items: start;
}
.sector-rank {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #eaf2ff;
    color: #155bd5;
    font-weight: 900;
}
.sector-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(90px, 1fr));
    gap: 8px;
    margin: 10px 0;
}
.sector-metrics span {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 9px;
}
.sector-metrics b {
    display: block;
    font-size: 16px;
    color: #0f172a;
}
.sector-metrics small {
    display: block;
    color: #64748b;
    margin-top: 2px;
}
.sector-stocks {
    justify-content: flex-start;
}
.sector-stocks a {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 12px;
}
.sector-stocks b { color: #16a34a; }
.summary-card {
    background: #fff;
    border: 1px solid #dbe5f0;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}
.summary-card strong { display:block; font-size:20px; color:#0f172a; }
.summary-card span { color:#64748b; font-size:12px; }

@media (max-width: 720px) {
    .page-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .page-tabs a {
        text-align: center;
        white-space: normal;
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .sector-card { grid-template-columns: 1fr; }
    .sector-rank { width: auto; height: auto; padding: 8px; }
    .sector-metrics { grid-template-columns: 1fr 1fr; }
    .news-card h3, .sector-card h3 { font-size: 15px; }
}

/* Top 5 bullish sectors with breakout stocks */
.top-breakout-sector .sector-subtitle {
    margin: 8px 0 6px;
    font-size: 13px;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.breakout-sector-stocks {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 8px;
    align-items: stretch;
}
.breakout-sector-stocks .breakout-stock-pill {
    display: grid;
    gap: 3px;
    border: 1px solid #bfdbfe;
    background: linear-gradient(180deg, #eff6ff, #ffffff);
    border-radius: 14px;
    padding: 9px;
    color: #0f172a;
    text-decoration: none;
    font-weight: 800;
}
.breakout-sector-stocks .breakout-stock-pill:hover {
    border-color: #2563eb;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .12);
}
.breakout-stock-pill strong { color: #0f4fb8; font-size: 13px; }
.breakout-stock-pill span { font-size: 12px; color: #334155; }
.breakout-stock-pill b { color: #16a34a; font-size: 13px; }
.breakout-stock-pill em,
.breakout-stock-pill small {
    font-style: normal;
    font-size: 11px;
    color: #64748b;
}
@media (max-width: 1100px) {
    .breakout-sector-stocks { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
}
@media (max-width: 640px) {
    .breakout-sector-stocks { grid-template-columns: 1fr; }
}
.soft-sep{border:0;border-top:1px solid rgba(148,163,184,.25);margin:18px 0}.compact-head{padding-top:4px}.rank-dot{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:#eef2ff;color:#1e40af;font-weight:800;font-size:12px}.impact-line{margin:.35rem 0;color:#475569;font-size:.85rem;background:#f8fafc;border-left:3px solid #cbd5e1;padding:7px 9px;border-radius:8px}

/* News movers page */
.news-mover-list{display:grid;gap:14px;}
.news-mover-card{border:1px solid rgba(148,163,184,.22);background:rgba(15,23,42,.62);border-radius:18px;padding:14px;box-shadow:0 10px 24px rgba(2,6,23,.16);}
.news-mover-card.good{border-left:4px solid #22c55e;}
.news-mover-card.bad{border-left:4px solid #ef4444;}
.news-mover-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;margin-bottom:10px;}
.mover-symbol-block{min-width:0;}
.mover-symbol-block .symbol-link{font-size:18px;text-decoration:none;color:#e5f0ff;}
.mover-symbol-block small{display:block;color:#94a3b8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px;}
.mover-price{text-align:right;min-width:82px;}
.mover-price strong{display:block;font-size:17px;color:#f8fafc;}
.mover-price span{font-weight:800;font-size:13px;}
.mover-price.good span{color:#22c55e;}
.mover-price.bad span{color:#f87171;}
.mover-metrics{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:8px 0 12px;}
.mover-metrics span{border:1px solid rgba(148,163,184,.16);background:rgba(15,23,42,.45);border-radius:12px;padding:8px;display:flex;flex-direction:column;gap:2px;font-size:12px;color:#dbeafe;}
.mover-metrics b{color:#94a3b8;font-size:11px;font-weight:700;}
.news-catalyst-box{border-radius:14px;background:rgba(2,6,23,.36);padding:12px;border:1px solid rgba(148,163,184,.14);}
.news-catalyst-box h3{font-size:15px;line-height:1.35;margin:8px 0;}
.news-catalyst-box h3 a{color:#eaf2ff;text-decoration:none;}
.news-catalyst-box h3 a:hover{text-decoration:underline;}
.news-summary-line{color:#a7b4c8;font-size:13px;}
@media (max-width:720px){
  .news-mover-head{grid-template-columns:auto 1fr;}
  .mover-price{grid-column:1 / -1;text-align:left;display:flex;gap:12px;align-items:center;background:rgba(15,23,42,.5);border-radius:12px;padding:8px;}
  .mover-metrics{grid-template-columns:repeat(2,1fr);}
}

/* Unified stock listing format for scanner, news movers, and bullish sectors */
.news-stock-table .news-catalyst-cell { min-width: 180px; }
.news-catalyst-compact { display:flex; flex-direction:column; gap:4px; font-size:11px; line-height:1.25; }
.news-catalyst-compact a { color:#0f4fb8; text-decoration:none; font-weight:800; }
.news-catalyst-compact a:hover { text-decoration:underline; }
.news-catalyst-compact em { font-style:normal; color:#64748b; }
.news-down-row { border-left:4px solid #ef4444; }
.sector-stock-table-wrap { max-height:none; overflow:visible; border:1px solid var(--border); border-radius:14px; }
.sector-stock-table { font-size:11px; }
.sector-stock-table th:nth-child(1) { width:8%; }
.sector-stock-table th:nth-child(2) { width:17%; }
.sector-stock-table th:nth-child(3) { width:7%; }
.sector-stock-table th:nth-child(4) { width:8%; }
.sector-stock-table th:nth-child(5) { width:10%; }
.sector-stock-table th:nth-child(6) { width:10%; }
.sector-stock-table th:nth-child(7) { width:10%; }
.sector-stock-table th:nth-child(8) { width:13%; }
.sector-stock-table th:nth-child(9) { width:13%; }
.sector-stock-table th:nth-child(10) { width:4%; }

@media (max-width:760px) {
  .compact-results-table td:nth-child(1)::before { content:'Stock'; }
  .compact-results-table td:nth-child(2)::before { content:'Company'; }
  .compact-results-table td:nth-child(3)::before { content:'Details'; }
  .compact-results-table td:nth-child(4)::before { content:'Price'; }
  .compact-results-table td:nth-child(5)::before { content:'Move'; }
  .compact-results-table td:nth-child(6)::before { content:'Volume'; }
  .compact-results-table td:nth-child(7)::before { content:'RSI / VWAP'; }
  .compact-results-table td:nth-child(8)::before { content:'Levels'; }
  .compact-results-table td:nth-child(9)::before { content:'Signal'; }
  .compact-results-table td:nth-child(10)::before { content:'Rating'; }
  .compact-results-table td:nth-child(11)::before { content:'Links'; }
  .news-stock-table td:nth-child(10)::before { content:'News'; }
  .news-stock-table td:nth-child(11)::before { content:'Links'; }
  .sector-stock-table td:nth-child(10)::before { content:'Links'; }
  .news-catalyst-cell, .news-catalyst-compact { text-align:right; align-items:flex-end; }
  .sector-stock-table-wrap { border:0; }
}

/* Priority signal/news layout + grouped columns */
.advanced-filters {
    margin-top: 12px;
    border: 1px dashed #cbd5e1;
    background: #fbfdff;
    border-radius: 12px;
    padding: 10px 12px;
}
.advanced-filters summary {
    cursor: pointer;
    font-weight: 900;
    color: #1d2939;
}
.advanced-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 9px;
    margin-top: 10px;
}
.advanced-grid label {
    display: grid;
    gap: 5px;
    font-size: 12px;
    font-weight: 800;
    color: #344054;
}
.advanced-grid input,
.advanced-grid select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 8px 9px;
    background: white;
    font-size: 13px;
}
.compact-results-table th.priority-col,
.compact-results-table td.priority-cell {
    min-width: 230px;
    max-width: 340px;
}
.compact-results-table .signal-cell {
    background: linear-gradient(90deg, rgba(239,246,255,.85), rgba(255,255,255,.65));
}
.compact-results-table .news-catalyst-cell {
    background: linear-gradient(90deg, rgba(255,251,235,.90), rgba(255,255,255,.70));
}
.market-levels-stack,
.technical-stack,
.news-catalyst-compact {
    display: grid;
    gap: 7px;
    text-align: left;
}
.main-price {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.main-price strong { font-size: 15px; }
.level-grid-mini {
    display: grid;
    grid-template-columns: repeat(2, minmax(65px, 1fr));
    gap: 3px 7px;
    font-size: 11px;
    color: #344054;
}
.technical-stack {
    grid-template-columns: 1fr 1fr 1fr;
    align-items: start;
    min-width: 270px;
}
.technical-stack .movement-stack,
.technical-stack .volume-stack,
.technical-stack .rsi-vwap-stack {
    padding: 4px 6px;
    border-radius: 9px;
    background: rgba(248,250,252,.9);
    border: 1px solid #edf2f7;
}
.news-catalyst-compact p {
    margin: 2px 0;
    font-size: 12px;
    line-height: 1.35;
    color: #344054;
    font-weight: 700;
}
.news-catalyst-compact small,
.news-catalyst-compact em {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
}
.news-catalyst-compact a {
    display: block;
    color: var(--blue);
    font-weight: 900;
    font-size: 12px;
    text-decoration: none;
    line-height: 1.35;
}
.linklike {
    display: inline-block;
    width: fit-content;
    padding: 0;
    background: transparent;
    color: var(--blue);
    border: 0;
    font-size: 12px;
    font-weight: 900;
    text-decoration: underline;
}
@media (max-width: 900px) {
    .advanced-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
    .technical-stack { grid-template-columns: 1fr; min-width: auto; }
    .compact-results-table th.priority-col,
    .compact-results-table td.priority-cell { min-width: auto; max-width: none; }
}
@media (max-width: 640px) {
    .advanced-grid { grid-template-columns: 1fr; }
    .compact-results-table .news-catalyst-cell,
    .compact-results-table .signal-cell { background: #fff; }
    .level-grid-mini { grid-template-columns: 1fr 1fr; }
}

/* Updated 9/8-column table sizing after grouping */
.compact-results-table th:nth-child(1), #resultsTable th:nth-child(1) { width: 7%; }
.compact-results-table th:nth-child(2), #resultsTable th:nth-child(2) { width: 16%; }
.compact-results-table th:nth-child(3), #resultsTable th:nth-child(3) { width: 6%; }
.compact-results-table th:nth-child(4), #resultsTable th:nth-child(4) { width: 13%; }
.compact-results-table th:nth-child(5), #resultsTable th:nth-child(5) { width: 22%; }
.compact-results-table th:nth-child(6), #resultsTable th:nth-child(6) { width: 16%; }
.compact-results-table th:nth-child(7), #resultsTable th:nth-child(7) { width: 15%; }
.compact-results-table th:nth-child(8), #resultsTable th:nth-child(8) { width: 4%; }
.compact-results-table th:nth-child(9), #resultsTable th:nth-child(9) { width: 4%; }
@media (max-width: 760px) {
  #resultsTable td:nth-child(1)::before, .compact-results-table td:nth-child(1)::before { content:'Stock'; }
  #resultsTable td:nth-child(2)::before, .compact-results-table td:nth-child(2)::before { content:'Company'; }
  #resultsTable td:nth-child(3)::before, .compact-results-table td:nth-child(3)::before { content:'Details'; }
  #resultsTable td:nth-child(4)::before, .compact-results-table td:nth-child(4)::before { content:'Market / Levels'; }
  #resultsTable td:nth-child(5)::before, .compact-results-table td:nth-child(5)::before { content:'Technicals'; }
  #resultsTable td:nth-child(6)::before, .compact-results-table td:nth-child(6)::before { content:'Signal'; }
  #resultsTable td:nth-child(7)::before, .compact-results-table td:nth-child(7)::before { content:'News'; }
  #resultsTable td:nth-child(8)::before, .compact-results-table td:nth-child(8)::before { content:'Rating / Links'; }
  #resultsTable td:nth-child(9)::before, .compact-results-table td:nth-child(9)::before { content:'Links'; }
  .news-stock-table td:nth-child(8)::before, .sector-stock-table td:nth-child(8)::before { content:'Links'; }
}
