:root{
  --bg:#f4f5f7; --card:#ffffff; --ink:#1f2937; --muted:#6b7280;
  --line:#e5e7eb; --accent:#2563eb; --accent-d:#1d4ed8;
  --green:#16a34a; --red:#dc2626; --amber:#d97706;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);
  font-family:"Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif;font-size:14px}
.wrap{max-width:1080px;margin:0 auto;padding:18px 14px 40px}

.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;gap:10px;flex-wrap:wrap}
.topbar h1{margin:0;font-size:22px}
.topbar .sub{margin:2px 0 0;color:var(--muted);font-size:13px}
.status-pill{display:flex;align-items:center;gap:8px;background:var(--card);
  border:1px solid var(--line);border-radius:999px;padding:8px 14px;font-size:13px}
.status-pill .dot{width:10px;height:10px;border-radius:50%;background:#9ca3af}
.status-pill.ok .dot{background:var(--green)}
.status-pill.warn .dot{background:var(--amber)}

.card{background:var(--card);border:1px solid var(--line);border-radius:10px;margin-bottom:14px;overflow:hidden}
.card-head{width:100%;display:flex;justify-content:space-between;align-items:center;
  padding:12px 16px;font-size:15px;font-weight:600;background:#fafbfc;border:none;cursor:pointer;color:var(--ink)}
.card-head.static{cursor:default}
.card-head .chev{color:var(--muted)}
.card-body{padding:14px 16px;border-top:1px solid var(--line)}
.card-body.collapsed{display:none}

.field{margin-bottom:12px}
.field label{display:block;font-weight:600;margin-bottom:6px;font-size:13px}
.field label small{font-weight:400;color:var(--muted)}
.hint{color:var(--muted);font-size:12px;display:block;margin-top:4px;line-height:1.5}
.hint code{background:#f3f4f6;padding:1px 5px;border-radius:4px;font-size:11px}

input[type=text],input[type=password],select,textarea{
  width:100%;padding:9px 10px;border:1px solid #d1d5db;border-radius:7px;font-size:14px;font-family:inherit}
input:focus,select:focus,textarea:focus{outline:2px solid #bfdbfe;border-color:var(--accent)}
textarea{resize:vertical}

.row{display:flex;gap:8px}
.row input{flex:1}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
.grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0 16px}
@media(max-width:720px){.grid2,.grid3{grid-template-columns:1fr}}

.btn{border:1px solid #d1d5db;background:#fff;border-radius:7px;padding:9px 16px;
  font-size:14px;cursor:pointer;white-space:nowrap;color:var(--ink)}
.btn:hover{background:#f9fafb}
.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}
.btn.primary:hover{background:var(--accent-d)}
.btn.ghost{background:transparent}
.btn:disabled{opacity:.5;cursor:not-allowed}

.linklike{background:none;border:none;color:var(--accent);cursor:pointer;font-size:13px;padding:6px 0}
.checks{display:flex;gap:16px;flex-wrap:wrap}
.checkbox{display:flex!important;align-items:center;gap:8px;font-weight:400!important;cursor:pointer}
.checkbox input{width:auto}
.field.check{display:flex;align-items:flex-end;padding-bottom:12px}

.msg{margin-top:10px;padding:10px 12px;border-radius:7px;font-size:13px}
.msg.ok{background:#ecfdf5;color:#065f46;border:1px solid #a7f3d0}
.msg.err{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}

.prog-top{display:flex;justify-content:space-between;font-size:13px;margin-bottom:6px}
.progbar{background:#e5e7eb;border-radius:999px;height:10px;overflow:hidden;margin-bottom:10px}
#progFill{height:100%;width:0;background:var(--accent);border-radius:999px;transition:width .3s}
.logbox{background:#111827;color:#d1d5db;border-radius:8px;padding:10px 12px;
  font-family:Consolas,monospace;font-size:12px;max-height:180px;overflow-y:auto;line-height:1.6}
.logbox .t{color:#6b7280}

.statrow{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.stat{background:#f8fafc;border:1px solid var(--line);border-radius:8px;padding:10px 14px;min-width:130px}
.stat .v{font-size:20px;font-weight:700}
.stat .k{font-size:12px;color:var(--muted)}

.tablewrap{overflow-x:auto;border:1px solid var(--line);border-radius:8px}
table{width:100%;border-collapse:collapse;font-size:13px}
thead th{background:#f8fafc;text-align:left;padding:10px 12px;font-weight:600;white-space:nowrap;
  border-bottom:1px solid var(--line);cursor:pointer;user-select:none}
thead th.num{text-align:right}
tbody td{padding:8px 12px;border-bottom:1px solid #f1f5f9;vertical-align:top}
tbody tr:hover{background:#f8fafc}
td.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.intent-tag{display:inline-block;background:#eef2ff;color:#3730a3;border-radius:4px;
  padding:1px 7px;font-size:11px;margin:1px 2px 1px 0}
.kd{font-weight:700}
.kd.e{background:#dcfce7;color:#166534;padding:2px 8px;border-radius:999px}
.kd.m{background:#fef9c3;color:#854d0e;padding:2px 8px;border-radius:999px}
.kd.h{background:#fee2e2;color:#991b1b;padding:2px 8px;border-radius:999px}
.spark{display:inline-block;vertical-align:middle}

.pager{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}
.pager select{width:auto}
#pgInfo{color:var(--muted);font-size:13px}

.histlist{display:flex;flex-direction:column;gap:8px}
.hist{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;flex-wrap:wrap}
.hist .kw{font-weight:600}
.hist .meta{color:var(--muted);font-size:12px}
.badge{font-size:11px;padding:2px 9px;border-radius:999px;font-weight:600}
.badge.done{background:#dcfce7;color:#166534}
.badge.running{background:#dbeafe;color:#1d4ed8}
.badge.error{background:#fee2e2;color:#991b1b}
.badge.queued{background:#fef9c3;color:#854d0e}
.hist .spacer{flex:1}

.foot{text-align:center;color:var(--muted);font-size:12px;margin-top:20px;line-height:1.6}

/* --- gaya ala Semrush: tab + filter bar --- */
.tabs{display:flex;gap:2px;border-bottom:2px solid #e5e7eb;margin:14px 0 12px}
.tab{background:none;border:none;padding:9px 16px;font-size:14px;color:#6b7280;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-2px;font-family:inherit}
.tab:hover{color:#111827}
.tab.active{color:#111827;font-weight:600;border-bottom-color:#2563eb}
.filterbar{display:flex;flex-wrap:wrap;gap:8px;align-items:stretch}
.ff{display:flex;flex-direction:column;gap:2px;min-width:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;padding:6px 10px}
.ff>label{font-size:11px;color:var(--muted);font-weight:500}
.ff input,.ff select{border:none;padding:3px 0;font-size:13px;width:auto;min-width:0;background:transparent}
.ff input:focus,.ff select:focus{outline:none}
.ff .checks.inline{display:flex;gap:10px;align-items:center;padding:3px 0}
.checks.inline .checkbox{font-size:12px;white-space:nowrap;font-weight:400}
.modepills{display:flex;gap:6px;flex-wrap:wrap;margin:2px 0 12px}
.mpill{background:#f3f4f6;border:1px solid #e5e7eb;border-radius:999px;padding:6px 14px;font-size:13px;color:#4b5563;cursor:pointer;font-family:inherit}
.mpill:hover{border-color:#9ca3af;color:#111827}
.mpill.active{background:#2563eb;border-color:#2563eb;color:#fff;font-weight:600}
.statline{font-size:14px;color:#374151;line-height:1.6}
.statline b{color:#111827}
@media(max-width:640px){.ff{flex:1 1 45%}.ff input,.ff select{width:100%}}
