.smart-filter-page{display:grid;gap:16px}
.smart-filter-hero,.smart-filter-card,.smart-results,.watch-panel{background:var(--card,#151a21);border:1px solid var(--border,#2a313b);border-radius:18px;padding:18px}
.smart-filter-hero{display:grid;gap:14px}
.smart-filter-title{display:flex;align-items:center;justify-content:space-between;gap:12px}
.smart-filter-title b{font-size:20px}
.smart-filter-title small{display:block;margin-top:5px;opacity:.7}
.smart-filter-input{display:grid;grid-template-columns:1fr auto;gap:10px}
.smart-filter-input textarea{width:100%;min-height:86px;resize:vertical;border:1px solid var(--border,#303844);background:var(--bg,#0f1318);color:inherit;border-radius:12px;padding:13px;font:inherit;line-height:1.8}
.smart-filter-input button,.preset-btn,.smart-action{border:0;border-radius:11px;padding:10px 15px;background:var(--accent,#e6b84a);color:#111;font-weight:700;cursor:pointer}
.preset-groups{display:grid;gap:12px}
.preset-group{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.preset-group>small{opacity:.65;min-width:90px}
.preset-btn{background:transparent;color:inherit;border:1px solid var(--border,#303844);font-weight:500}
.preset-btn:hover{border-color:var(--accent,#e6b84a)}
.smart-status{min-height:24px;color:var(--muted,#9aa3ad)}
.smart-status.error{color:#ef7777}
.smart-status.ok{color:#63c98a}
.smart-conditions{display:flex;flex-wrap:wrap;gap:9px}
.condition-chip{display:flex;align-items:center;gap:7px;padding:9px 11px;border-radius:12px;background:var(--bg,#0f1318);border:1px solid var(--border,#303844)}
.condition-chip code{direction:ltr;font-family:ui-monospace,monospace}
.smart-results-head,.watch-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.smart-results-head b,.watch-head b{font-size:17px}
.smart-results-head small,.watch-head small{display:block;opacity:.7;margin-top:4px}
.smart-table{overflow:auto;margin-top:14px}
.smart-table table{width:100%;border-collapse:collapse;min-width:720px}
.smart-table th,.smart-table td{padding:10px;border-bottom:1px solid var(--border,#252c35);text-align:right;white-space:nowrap}
.smart-table th{opacity:.7;font-size:12px}
.smart-table td strong{font-size:15px}
.smart-table button{border:1px solid var(--border,#303844);background:transparent;color:inherit;border-radius:8px;padding:6px 9px;cursor:pointer}
.match-reasons{font-size:11px;opacity:.7;white-space:normal;max-width:260px}
.smart-empty{text-align:center;padding:28px;opacity:.65}
.watch-panel{margin-top:0}
.watch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;margin-top:14px}
.watch-grid article{border:1px solid var(--border,#2a313b);border-radius:14px;padding:13px;background:var(--bg,#10151b)}
@media(max-width:700px){
 .smart-filter-input{grid-template-columns:1fr}
 .smart-filter-input>*{min-width:0}
 .smart-filter-title{align-items:flex-start}
 .preset-group>small{width:100%}
}

/* Primary discovery and personal monitoring are separate jobs. */
.smart-page-tabs{display:flex;gap:8px;padding:5px;border:1px solid var(--border,#2a313b);border-radius:14px;background:var(--card,#151a21);overflow:auto}
.smart-page-tab{flex:1 0 auto;border:0;border-radius:10px;padding:11px 16px;background:transparent;color:inherit;font:inherit;font-weight:700;cursor:pointer}
.smart-page-tab.active{background:var(--accent,#e6b84a);color:#111}
.smart-tab-panel{display:grid;gap:16px;min-width:0}
.smart-tab-panel[hidden]{display:none}

/* Ready-made filters describe their purpose before the user runs them. */
.preset-library{gap:16px}
.preset-category{display:grid;gap:9px;padding-top:14px;border-top:1px solid var(--border,#2a313b)}
.preset-category:first-child{padding-top:0;border-top:0}
.preset-category header{height:auto;background:transparent;border:0;padding:0;display:grid;gap:3px}
.preset-category header b{font-size:14px}
.preset-category header small{opacity:.68}
.preset-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px}
.preset-card{min-width:0;min-height:76px;display:grid;align-content:start;gap:6px;text-align:right!important;padding:11px!important;background:linear-gradient(145deg,#1b2630,#131a22)!important}
.preset-card b{font-size:13px}
.preset-card small{color:var(--muted,#aab8c5);font-size:10px;line-height:1.6;white-space:normal}
.preset-card:hover,.preset-card:focus-visible{border-color:var(--accent,#e6b84a)!important;background:#233340!important}

@media(max-width:700px){
 .smart-page-tabs{gap:5px;padding:4px}
 .smart-page-tab{padding:10px 12px}
 .preset-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .preset-card{min-height:82px;padding:10px!important}
}
@media(max-width:420px){.smart-filter-page{padding-inline:10px}.smart-page-tabs button{flex:1 0 auto;padding-inline:9px}.preset-cards{grid-template-columns:1fr}.smart-table{margin-inline:0;max-width:100%}}
