:root {
  --bg: #f4f7f8;
  --panel: #fff;
  --ink: #17232c;
  --muted: #6b7a86;
  --line: #e4eaed;
  --teal: #0f766e;
  --teal-dark: #0a4f4b;
  --teal-soft: #dff4f1;
  --blue: #2563eb;
  --violet: #7c3aed;
  --amber: #d97706;
  --red: #c2414a;
  --shadow: 0 10px 30px rgba(22, 42, 52, .07);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small-text { font-size: 12px; margin: 3px 0 0; }
.eyebrow { color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: 1.5px; margin: 0 0 5px; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 15%, #d4f3ee 0, transparent 32%), linear-gradient(135deg, #f8fbfb, #edf4f4); }
.login-card { width: min(440px, 100%); padding: 42px; border: 1px solid rgba(255,255,255,.8); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: 0 28px 70px rgba(15, 76, 72, .15); }
.login-card h1 { margin: 10px 0 8px; font-size: 30px; }
.login-card > .muted { line-height: 1.7; margin-bottom: 26px; }
.brand-mark { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, #20a898, var(--teal-dark)); color: white; font-weight: 900; letter-spacing: -1px; box-shadow: 0 10px 24px rgba(15,118,110,.25); }
.brand-mark.small { width: 43px; height: 43px; border-radius: 13px; font-size: 13px; flex: 0 0 auto; }
.stack { display: grid; gap: 16px; }
label { display: grid; gap: 8px; color: #33434e; font-size: 13px; font-weight: 700; }
input, select { width: 100%; min-height: 46px; border: 1px solid #dce4e8; border-radius: 11px; padding: 0 14px; color: var(--ink); background: #fff; outline: none; transition: .18s; }
input:focus, select:focus { border-color: #3b9f96; box-shadow: 0 0 0 3px rgba(15,118,110,.10); }
.form-error { color: var(--red); min-height: 20px; font-size: 13px; margin-bottom: 0; }
.button { min-height: 42px; border: 1px solid transparent; border-radius: 10px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 13px; transition: .18s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: linear-gradient(135deg, #159388, var(--teal)); box-shadow: 0 8px 18px rgba(15,118,110,.18); }
.button.secondary { color: #fff; background: #253c48; }
.button.ghost { background: #fff; color: #40515c; border-color: var(--line); }
.button.wide { width: 100%; margin-top: 4px; }
.danger-text { color: var(--red) !important; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 0 0 auto; width: 250px; z-index: 20; color: #dceceb; background: linear-gradient(180deg, #103c3b 0%, #092c2d 100%); display: flex; flex-direction: column; padding: 24px 16px; box-shadow: -8px 0 30px rgba(3, 28, 29, .08); }
.brand-row { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-row strong { display: block; color: #fff; }
.brand-row small { display: block; margin-top: 4px; color: #82aaa7; font-size: 10px; }
nav { display: grid; gap: 8px; margin-top: 25px; }
.nav-item { width: 100%; min-height: 45px; border: 0; border-radius: 10px; padding: 0 14px; display: flex; align-items: center; gap: 12px; color: #abc5c3; background: transparent; text-align: right; font-weight: 700; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(45, 190, 173, .13); }
.nav-item.active { box-shadow: inset -3px 0 #32c5b4; }
.nav-item.danger { color: #efb0b4; border-top: 1px solid rgba(255,255,255,.07); border-radius: 0; margin-top: 10px; padding-top: 12px; }
.sidebar-bottom { margin-top: auto; }
.source-mini { display: grid; gap: 7px; padding: 14px; border-radius: 11px; background: rgba(0,0,0,.12); font-size: 11px; }
.mini-source { display: flex; justify-content: space-between; color: #b5cecc; }
.dot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; background: #d38d36; }
.dot.on { background: #3fce9b; box-shadow: 0 0 0 3px rgba(63,206,155,.12); }
.workspace { width: calc(100% - 250px); margin-right: 250px; min-width: 0; }
.topbar { height: 78px; background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 32px; position: sticky; top: 0; z-index: 10; backdrop-filter: blur(9px); }
.topbar h2 { font-size: 19px; margin: 0; }
.icon-button { display: none; border: 0; background: transparent; font-size: 23px; }
.user-chip { margin-right: auto; display: flex; align-items: center; gap: 10px; direction: ltr; }
.user-chip > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--teal-soft); color: var(--teal); font-weight: 900; }
.user-chip strong, .user-chip small { display: block; text-align: left; }
.user-chip strong { font-size: 12px; }
.user-chip small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.content { padding: 26px 30px 50px; max-width: 1600px; margin: auto; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { min-height: 106px; background: var(--panel); border: 1px solid #edf1f3; border-radius: 15px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; padding: 18px; }
.stat-card small, .stat-card strong { display: block; }
.stat-card small { color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.stat-card strong { font-size: 25px; letter-spacing: -.5px; }
.stat-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; font-weight: 900; }
.stat-icon.teal { background: #dff5f1; color: var(--teal); }.stat-icon.blue { background: #e5edff; color: var(--blue); }.stat-icon.violet { background: #eee7ff; color: var(--violet); }.stat-icon.amber { background: #fff0d8; color: var(--amber); }
.panel { background: var(--panel); border: 1px solid #e9eef0; border-radius: 16px; box-shadow: var(--shadow); padding: 22px; margin-bottom: 20px; }
.panel-heading, .job-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.panel h3 { margin: 0; font-size: 17px; }
.search-form { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) 130px 150px; align-items: end; gap: 13px; margin-top: 20px; }
.search-button { min-height: 46px; }
.hint { color: var(--muted); font-size: 11px; margin: 12px 0 0; }
.badge-row { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.source-badge { border-radius: 999px; padding: 6px 10px; font-size: 10px; font-weight: 800; background: #f1f4f5; color: #6f7d85; }
.source-badge.on { background: #e2f7f0; color: #11745c; }
.job-panel { border-right: 4px solid #27a99b; }
.job-head h3 { margin-top: 9px; }.job-head p { font-size: 12px; margin: 5px 0 0; }
.status { border-radius: 99px; padding: 5px 9px; font-size: 10px; font-weight: 900; }
.status.running, .status.queued { color: #986110; background: #fff0ce; }.status.completed { color: #0d7757; background: #dff5eb; }.status.failed, .status.cancelled { color: #a52d39; background: #fbe4e7; }
.progress-track { height: 8px; border-radius: 99px; background: #edf2f3; overflow: hidden; margin-top: 20px; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #25b4a4, var(--teal)); transition: width .4s ease; }
.progress-details { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 8px; }
.source-progress { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.source-item { padding: 7px 9px; background: #f5f7f8; border-radius: 8px; font-size: 10px; color: #596871; }
.results-heading { margin-bottom: 16px; }
.count-pill { display: inline-grid; place-items: center; min-width: 28px; padding: 2px 8px; border-radius: 99px; color: var(--teal); background: var(--teal-soft); font-size: 12px; }
.actions { display: flex; gap: 8px; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 9px; padding: 13px; background: #f7f9fa; border-radius: 12px; margin-bottom: 16px; }
.filters input, .filters select { min-height: 40px; font-size: 12px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 1050px; border-collapse: collapse; text-align: right; }
th { padding: 12px; color: #6d7a82; background: #f7f9fa; border-bottom: 1px solid var(--line); font-size: 10px; letter-spacing: .3px; }
td { padding: 14px 12px; border-bottom: 1px solid #edf1f3; vertical-align: top; font-size: 12px; line-height: 1.55; }
tbody tr:hover { background: #fbfdfd; }
.lead-name { font-weight: 800; font-size: 13px; margin-bottom: 4px; }
.category-tag { display: inline-block; color: #34716b; background: #eef8f7; border-radius: 6px; padding: 2px 6px; font-size: 9px; }
.contact-line { display: block; direction: ltr; text-align: right; color: #3d4f59; text-decoration: none; margin-bottom: 3px; }
.contact-line.email { color: #315e9c; }
.social-links { display: flex; flex-wrap: wrap; gap: 5px; }
.link-chip { padding: 4px 7px; border: 1px solid #dbe5e7; border-radius: 6px; color: #315c61; background: #fff; text-decoration: none; font-size: 9px; }
.stars { color: #dc8a16; font-weight: 900; }.review-count { color: var(--muted); font-size: 10px; }
.source-tags { display: flex; gap: 4px; flex-wrap: wrap; }.source-tag { padding: 3px 6px; border-radius: 5px; background: #eff3f4; color: #617078; font-size: 8px; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }.empty > div { font-size: 32px; }.empty h4 { color: var(--ink); margin-bottom: 4px; }.empty p { font-size: 12px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 18px; color: var(--muted); font-size: 12px; }
.history-list { display: grid; gap: 10px; margin-top: 18px; }
.history-row { display: grid; grid-template-columns: 1.3fr 1fr 110px 100px 120px; gap: 15px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.history-row h4 { margin: 0 0 5px; }.history-row p { margin: 0; color: var(--muted); font-size: 11px; }
.toast { position: fixed; left: 24px; bottom: 24px; z-index: 100; max-width: 380px; padding: 13px 17px; border-radius: 11px; color: white; background: #253c48; box-shadow: 0 12px 35px rgba(0,0,0,.18); transform: translateY(100px); opacity: 0; transition: .25s; font-size: 13px; }
.toast.show { transform: translateY(0); opacity: 1; }.toast.error { background: #a3323c; }.toast.success { background: #0d785d; }
@media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(2, 1fr); }.search-form { grid-template-columns: 1fr 1fr; }.history-row { grid-template-columns: 1fr 1fr 100px; }.history-row > :nth-child(4), .history-row > :nth-child(5) { display: none; } }
@media (max-width: 760px) { .sidebar { transform: translateX(110%); transition: .25s; }.sidebar.open { transform: translateX(0); }.workspace { width: 100%; margin-right: 0; }.icon-button { display: block; }.topbar { padding: 0 16px; }.user-chip div { display: none; }.content { padding: 18px 12px 35px; }.stats-grid { gap: 10px; }.stat-card { min-height: 90px; padding: 13px; }.stat-icon { width: 38px; height: 38px; }.stat-card strong { font-size: 21px; }.panel { padding: 16px; border-radius: 13px; }.panel-heading { align-items: flex-start; }.badge-row { display: none; }.search-form, .filters { grid-template-columns: 1fr; }.compact-field { display: none; }.job-head { align-items: flex-start; }.actions .button { padding: 0 10px; }.history-row { grid-template-columns: 1fr auto; }.history-row > :nth-child(2), .history-row > :nth-child(4), .history-row > :nth-child(5) { display: none; } }
@media (max-width: 420px) { .stats-grid { grid-template-columns: 1fr; }.login-card { padding: 28px 22px; }.results-heading { flex-direction: column; }.actions { width: 100%; }.actions .button { flex: 1; } }

