:root{
  --bg:#070c16;
  --panel:rgba(255,255,255,.06);
  --line:rgba(255,255,255,.12);
  --text:#eaf0ff;
  --muted:rgba(234,240,255,.72);
  --muted2:rgba(234,240,255,.55);
  --brand:#4f7cff;

  --okBg:rgba(46,204,113,.10);
  --warnBg:rgba(241,196,15,.10);
  --badBg:rgba(231,76,60,.10);

  --chip:rgba(255,255,255,.10);
  --shadow:0 14px 40px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 20% 0%, #0b1736 0%, var(--bg) 60%),
    radial-gradient(900px 400px at 85% 15%, rgba(79,124,255,.15) 0%, rgba(0,0,0,0) 65%);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
}

/* =======================
   顶部导航
======================= */
.nav{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 16px;
  background:rgba(8,14,26,.78);
  border-bottom:1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
}

.navLeft{display:flex;align-items:center;gap:10px;min-width:220px}
.brandDot{
  width:12px;height:12px;border-radius:50%;
  background:var(--brand);
  box-shadow:0 0 0 4px rgba(79,124,255,.16);
}
.brandTitle{font-weight:950;letter-spacing:.2px}
.brandSub{font-size:12px;color:var(--muted2);margin-top:2px}
.brandText{line-height:1.1}

/* ✅ tabs: 小屏自动横向滚动，不挤爆 */
.tabs{
  display:flex;
  gap:8px;
  flex-wrap:nowrap;
  justify-content:center;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.tabs::-webkit-scrollbar{display:none}

.tab{
  appearance:none;
  border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  color:var(--text);
  padding:8px 12px;
  border-radius:999px;
  cursor:pointer;
  font-weight:850;
  font-size:13px;
  flex:0 0 auto;
  white-space:nowrap;
}
.tab:hover{background:rgba(255,255,255,.08)}
.tab.active{
  border-color:rgba(79,124,255,.55);
  background:rgba(79,124,255,.16);
}

.navRight{display:flex;align-items:center;gap:10px}
.pillMini{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
}

/* =======================
   主容器 / 视图
======================= */
.wrap{
  width:100vw;
  min-height:calc(100vh - 56px);
  margin:0;
  padding:16px 16px 18px;
  max-width:none;
  overflow:auto;
}

.view{display:none}
.view.show{display:block}

.top{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  margin-bottom:12px;
}
h1{
  margin:0;
  font-size:30px;
  letter-spacing:.4px;
  line-height:1.2;
}
.sub{
  margin-top:6px;
  color:var(--muted);
  font-size:13px;
  line-height:1.55;
}

.kpi{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.k{
  padding:8px 10px;
  border-radius:12px;
  background:rgba(255,255,255,.05);
  border:1px solid var(--line);
  font-size:13px;
  color:var(--muted);
  backdrop-filter: blur(8px);
  white-space:nowrap;
}
.k b{color:var(--text)}

/* ✅ card 不再强制 min-height，占满导致空白大 */
.card{
  width:100%;
  background:rgba(255,255,255,.045);
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  box-shadow:var(--shadow);
}
.card + .card{ margin-top:14px; }

.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.row.space{justify-content:space-between;align-items:flex-start}

.btn{
  appearance:none;border:0;border-radius:12px;
  padding:10px 14px;
  background:var(--brand);
  color:white;
  cursor:pointer;
  font-weight:800;
  box-shadow:0 10px 30px rgba(79,124,255,.18);
}
.btn:disabled{opacity:.65;cursor:not-allowed}
.btn.ghost{
  background:transparent;
  border:1px solid var(--line);
  color:var(--text);
  box-shadow:none;
}

.statline{
  display:flex;gap:10px;align-items:center;flex-wrap:wrap;
  color:var(--muted);
  font-size:12px;
}

textarea{
  width:100%;
  height:160px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.18);
  color:var(--text);
  padding:12px 12px;
  outline:none;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:13px;
  line-height:1.45;
}

.bar{
  height:10px;border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;border:1px solid var(--line);
  width:260px;max-width:55vw;
}
.bar > div{
  height:100%;width:0%;
  background:linear-gradient(90deg, rgba(79,124,255,.95), rgba(79,124,255,.25));
  transition:width .25s;
}

.tiny{color:var(--muted2);font-size:12px}
.err{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(231,76,60,.10);
  color:rgba(255,255,255,.92);
  margin-top:10px;
}

/* ✅ 通用提示盒（GSC/其它模块输出用） */
.okBox,.warnBox,.badBox{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  margin-top:10px;
  line-height:1.55;
  font-size:12px;
}
.okBox{ background:rgba(46,204,113,.10); border-color:rgba(46,204,113,.25); }
.warnBox{ background:rgba(241,196,15,.10); border-color:rgba(241,196,15,.25); }
.badBox{ background:rgba(231,76,60,.10); border-color:rgba(231,76,60,.25); }

.chip{
  display:inline-flex;gap:6px;align-items:center;
  padding:3px 10px;border-radius:999px;
  background:var(--chip);
  border:1px solid var(--line);
  font-size:12px;
  white-space:nowrap;
}
.ok{background:var(--okBg); border-color:rgba(46,204,113,.25)}
.warn{background:var(--warnBg); border-color:rgba(241,196,15,.25)}
.bad{background:var(--badBg); border-color:rgba(231,76,60,.25)}
.ellipsis{ overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;width:100%; }

.iconBtn{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 10px;border-radius:10px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  color:var(--text);
  cursor:pointer;
  font-size:12px;
  user-select:none;
  white-space:nowrap;
}
.iconBtn:hover{background:rgba(255,255,255,.08)}
.iconBtn:active{transform:translateY(1px)}

.toast{
  position:fixed;right:16px;bottom:16px;
  background:rgba(10,16,30,.92);
  border:1px solid var(--line);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  box-shadow:var(--shadow);
  opacity:0;
  transform:translateY(8px);
  transition:opacity .18s, transform .18s;
  pointer-events:none;
  z-index:99;
  font-size:12px;
}
.toast.show{opacity:1;transform:translateY(0)}

/* =======================
   Grid（状态检测表格）
======================= */
.gridWrap{
  margin-top:12px;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.gridRow{ min-height:72px; }

.gridHead, .gridRow{
  display:grid;
  grid-template-columns:
    minmax(200px, 1.15fr)
    minmax(165px, .95fr)
    minmax(180px, 1fr)
    minmax(160px, .9fr)
    minmax(160px, .9fr)
    minmax(200px, 1.05fr)
    minmax(110px, .65fr)
    minmax(130px, .7fr)
    minmax(210px, 1.15fr)
    minmax(170px, .85fr)
    minmax(110px, .55fr);
  gap:0;
  align-items:center;
  min-width: 1250px;
}
.gridHead{
  position:sticky;top:0;z-index:3;
  background:rgba(8,14,26,.92);
  backdrop-filter: blur(8px);
  border-bottom:1px solid rgba(255,255,255,.10);
}
.gridHead > div{
  color:var(--muted);
  font-weight:900;
  font-size:11.5px;
  letter-spacing:.45px;
  white-space:nowrap;
}
.gridHead > div,
.gridRow > div{
  padding:12px 12px;
  min-width:0;
}
.gridBody .gridRow{ border-bottom:1px solid rgba(255,255,255,.10); }
.okRow{background:rgba(46,204,113,.06)}
.warnRow{background:rgba(241,196,15,.07)}
.badRow{background:rgba(231,76,60,.08)}
.gridBody .gridRow{ transition: background .15s ease, transform .15s ease; }
.gridBody .gridRow:hover{
  background: rgba(255,255,255,.035);
  transform: translateY(-1px);
}

.cell{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
  justify-content:center;
}
.main{ font-size:14px; line-height:1.25; font-weight:900; color:var(--text); }
.main2{ font-size:13px; line-height:1.25; font-weight:800; color:rgba(234,240,255,.92); }
.subline{ font-size:12px; line-height:1.25; color:var(--muted2); min-height:16px; }
.monoLine{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12px;
  line-height:1.25;
  color:rgba(234,240,255,.88);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:2px;
  min-height:28px;
  align-items:center;
}
.chips{ display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.cellCenter{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  height:100%;
}

/* =======================
   Tooltip
======================= */
.tip{ position:relative; display:inline-flex; align-items:center; }
.tip:hover::after{
  content: attr(data-tip);
  position:absolute;
  left:0;
  top:calc(100% + 8px);
  min-width:240px;
  max-width:520px;
  white-space:pre-wrap;
  padding:10px 10px;
  border-radius:12px;
  background:rgba(10,16,30,.98);
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 14px 40px rgba(0,0,0,.45);
  color:rgba(234,240,255,.92);
  font-size:12px;
  line-height:1.45;
  z-index:999;
}
.tip:hover::before{
  content:"";
  position:absolute;
  left:14px;
  top:100%;
  border:7px solid transparent;
  border-bottom-color:rgba(255,255,255,.18);
}

/* =======================
   Drawer
======================= */
.drawerMask{
  position:fixed;inset:0;
  background:rgba(0,0,0,.45);
  opacity:0;pointer-events:none;
  transition:opacity .18s;
  z-index:80;
}
.drawerMask.show{opacity:1;pointer-events:auto}

.drawer{
  position:fixed;top:0;right:0;height:100vh;
  width:min(620px, 92vw);
  background:rgba(10,16,30,.96);
  border-left:1px solid var(--line);
  box-shadow:var(--shadow);
  transform:translateX(100%);
  transition:transform .18s;
  z-index:81;
  display:flex;flex-direction:column;
}
.drawer.show{transform:translateX(0)}
.drawerHeader{
  padding:14px 14px;
  border-bottom:1px solid rgba(255,255,255,.10);
  display:flex;align-items:flex-start;justify-content:space-between;gap:10px;
}
.drawerTitle{font-weight:950;font-size:16px}
.drawerBody{padding:14px;overflow:auto}
.kv{
  display:grid;
  grid-template-columns:120px 1fr;
  gap:8px 10px;
  font-size:12px;
  color:var(--muted);
  margin-bottom:12px;
}
.kv b{color:var(--text);font-weight:900}
.hr{height:1px;background:rgba(255,255,255,.10);margin:12px 0}
.pill{
  display:inline-flex;align-items:center;gap:6px;
  padding:4px 10px;border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-size:12px;
  margin-right:8px;margin-top:8px;
  white-space:nowrap;
}
.monoBlock{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12px;
  line-height:1.35;
  white-space:pre-wrap;
  word-break:break-word;
  color:rgba(234,240,255,.90);
  margin-top:10px;
}
.conclusion{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(79,124,255,.08);
  color:rgba(234,240,255,.95);
  margin:0 0 12px 0;
  line-height:1.5;
  font-size:12px;
}
.conclusion b{font-size:13px}

/* =======================
   收录表格（对齐 + 干净背景）
======================= */
.iTable{
  margin-top:12px;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:rgba(255,255,255,.02);
}

.iHead,.iRow{
  display:grid;
  grid-template-columns: minmax(260px,1.2fr) minmax(260px,1fr) minmax(260px,1fr) minmax(220px,.8fr);
  align-items:stretch;
}

.iHead{
  background:rgba(8,14,26,.92);
  border-bottom:1px solid rgba(255,255,255,.10);
}
.iHead > div{
  padding:12px;
  color:var(--muted);
  font-weight:900;
  font-size:11.5px;
  letter-spacing:.45px;
  white-space:nowrap;
}

.iRow{
  min-height:88px;
  background:rgba(0,0,0,.06);
}
.iRow:nth-child(even){
  background:rgba(255,255,255,.015);
}
.iRow:hover{
  background:rgba(255,255,255,.03);
}

.iRow > div{
  padding:12px;
  min-width:0;
  display:flex;
  align-items:center;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.iRow:last-child > div{border-bottom:0}

.iCellLeft{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
  width:100%;
  min-width:0;
}
.iCellLeft .main{margin:0}
.iCellLeft .subline{margin:0}

.iEngine{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
  width:100%;
  min-width:0;
}
.iEngine .chips{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.iEngine .subline{min-height:16px}

.iOps{
  justify-content:flex-end;
}
.iTools{
  display:flex;
  gap:10px;
  flex-wrap:nowrap;
  align-items:center;
}
.iTools .iconBtn{
  padding:7px 12px;
  border-radius:999px;
}

/* =======================
   GSC（新增：结果输出区域风格）
======================= */
#gscOut, #outGsc, #tableGsc{
  margin-top:12px;
}
#outGsc .monoBlock, #tableGsc .monoBlock{
  margin-top:8px;
}
.siteList{display:flex;flex-direction:column;gap:2px;margin-top:6px}
.siteRow{
  display:flex;align-items:center;gap:8px;
  padding:5px 8px;border-radius:8px;
  background:rgba(255,255,255,.03);
  font-size:13px;
}
.siteRow:hover{background:rgba(255,255,255,.06)}
.siteTag{color:var(--muted);font-size:11px;min-width:52px}
.sitePerm{color:var(--muted);font-size:11px;min-width:70px}
.siteUrl{flex:1;font-family:monospace;font-size:12px;color:var(--fg)}
#tableGsc{
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:rgba(255,255,255,.02);
}

/* ✅ 小屏：顶部布局/按钮更紧凑 */
@media (max-width: 860px){
  .navLeft{min-width:auto}
  .brandSub{display:none}

  .top{flex-direction:column;align-items:flex-start}
  .kpi{justify-content:flex-start}
  .bar{width:100%;max-width:100%}

  .iHead,.iRow{
    grid-template-columns: minmax(220px,1fr) minmax(220px,1fr) minmax(160px,.6fr);
  }
  .iHead > div:nth-child(3),
  .iRow  > div:nth-child(3){display:none} /* 隐藏 BING 列 */
}

/* =========================================================
   GSC PAGE - ALIGN + SPACING (追加到 app.css 末尾)
   目标：全对齐、间距紧凑、按钮同高、移动端自适应
========================================================= */

.gscCard{
  padding:16px;
}

/* ---------- Header ---------- */
.gscHead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}

.gscHeadLeft{
  min-width:0;
}

.gscTitle{
  font-size:18px;
  font-weight:950;
  letter-spacing:.2px;
  margin:0;
}

.gscDesc{
  margin-top:6px;
  font-size:13px;
  line-height:1.55;
  color:var(--muted);
}

.gscAuth{
  margin-top:6px;
  opacity:.9;
}

.gscHeadRight{
  display:flex;
  align-items:center;
  justify-content:flex-end;
}

/* ---------- Toolbar ---------- */
.gscToolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin:10px 0 12px;
  padding:10px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.02);
  border-radius:14px;
}

.gscToolbarLeft,
.gscToolbarRight{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

/* 统一按钮高度/基线（你现有 btn 有 padding，这里强制对齐） */
.gscToolbar .btn{
  height:34px;
  line-height:34px;
  padding:0 14px;
  font-size:13px;
  border-radius:12px;
}
.gscToolbar .btn.ghost{
  box-shadow:none;
}

/* ---------- Kind Row ---------- */
.gscKindRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:6px 0 10px;
}

.gscKindLeft{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}

.gscKindRight{
  text-align:right;
  color:var(--muted2);
  max-width:55%;
  line-height:1.35;
}

/* Radio 对齐：圆点与文字居中 */
.gscRadio{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:13px;
  color:rgba(234,240,255,.92);
  user-select:none;
}
.gscRadio input{
  transform:translateY(1px);
}

/* ---------- Textarea ---------- */
.gscTextarea{
  width:100%;
  min-height:140px;      /* 比你原来的 160 更紧凑 */
  height:auto;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.18);
  color:var(--text);
  padding:12px;
  outline:none;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:13px;
  line-height:1.5;
  margin-top:6px;
}

/* ---------- Footer / Output ---------- */
.gscFoot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,.10);
}

.gscOut{
  margin-top:10px;
}

/* 如果 logBox 你没定义高度，这里给一个更好用的输出区 */
.logBox.gscOut,
#gscOut.logBox,
#outGsc.logBox{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.14);
  border-radius:14px;
  padding:12px;
  min-height:90px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px){
  .gscHead{
    flex-direction:column;
    align-items:flex-start;
  }

  .gscHeadRight{
    width:100%;
    justify-content:flex-start;
  }

  .gscToolbar{
    padding:10px;
  }

  .gscToolbarLeft,
  .gscToolbarRight{
    width:100%;
  }

  .gscToolbarRight{
    justify-content:flex-start;
  }

  .gscKindRow{
    flex-direction:column;
    align-items:flex-start;
  }

  .gscKindRight{
    max-width:100%;
    text-align:left;
  }
}


/* Progress Modal */
.pMask{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  display:flex; align-items:center; justify-content:center;
  z-index: 9999;
}
.pMask.hidden{ display:none; }

.pModal{
  width: min(520px, calc(100vw - 28px));
  background: rgba(16,22,34,.96);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  overflow:hidden;
}

.pHead{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.pTitle{ font-size: 15px; font-weight: 700; }
.pSub{ margin-top: 4px; font-size: 12px; opacity:.8; }
.pX{
  width: 34px; height: 34px;
  border: 0; border-radius: 10px;
  background: rgba(255,255,255,.08);
  color:#fff; cursor:pointer;
}
.pX:hover{ background: rgba(255,255,255,.12); }

.pBarWrap{ padding: 12px 16px 6px; display:flex; gap:10px; align-items:center; }
.pBar{
  flex: 1;
  height: 10px;
  background: rgba(255,255,255,.10);
  border-radius: 999px;
  overflow:hidden;
}
.pBarFill{
  height: 100%;
  background: linear-gradient(90deg, rgba(60,190,255,1), rgba(124,255,210,1));
  border-radius: 999px;
  transition: width .25s ease;
}
.pPct{ width: 52px; text-align:right; font-size: 12px; opacity:.85; }

.pSteps{
  padding: 8px 16px 14px;
  display:flex; flex-direction:column; gap:10px;
  max-height: 40vh;
  overflow:auto;
}

.pStep{
  display:flex; gap:10px; align-items:flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
}
.pDot{
  width: 10px; height: 10px; border-radius: 50%;
  margin-top: 4px;
  background: rgba(255,255,255,.35);
}
.pStep.ok .pDot{ background: rgba(124,255,210,1); }
.pStep.bad .pDot{ background: rgba(255,120,120,1); }
.pStep.run .pDot{ background: rgba(60,190,255,1); box-shadow: 0 0 0 6px rgba(60,190,255,.12); }

.pStepTitle{ font-size: 13px; font-weight: 700; }
.pStepDesc{ margin-top: 4px; font-size: 12px; opacity:.85; white-space: pre-wrap; word-break: break-word; }

.pFoot{
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  display:flex; justify-content:flex-end; gap:10px;
}
