*{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#f5f8fc;
  --surface:#fff;
  --surface-2:#f8fbff;
  --text:#171827;
  --muted:#758093;
  --line:#e7edf5;
  --primary:#4aaef0;
  --primary-2:#2d9de0;
  --primary-soft:#eaf6ff;
  --danger:#ff5a5a;
  --success:#34c759;
  --warning:#ffc85b;
  --shadow:0 14px 34px rgba(93,126,154,.10);
}
body{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;
  background:
    radial-gradient(circle at 88% 4%,rgba(74,174,240,.12),transparent 280px),
    linear-gradient(180deg,#f9fcff 0%,var(--bg) 38%,#f4f7fb 100%);
  color:var(--text);
  font-size:14px;
  min-height:100vh;
}
a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:none;color:var(--primary-2)}
.layout{display:flex;min-height:100vh}
.nav-toggle{display:none}
.sidebar-scrim{display:none}
.sidebar{
  width:236px;
  background:rgba(255,255,255,.92);
  border-right:1px solid var(--line);
  display:flex;
  flex-direction:column;
  position:fixed;
  top:0;
  left:0;
  height:100vh;
  z-index:100;
  backdrop-filter:blur(18px);
}
.sidebar-logo{
  display:flex;
  align-items:center;
  gap:10px;
  padding:22px 22px 18px;
  border-bottom:1px solid var(--line);
  font-weight:900;
  font-size:17px;
  color:var(--text);
  letter-spacing:.2px;
}
.sidebar-logo span{color:var(--primary)}
.brand-mark{
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:13px;
  background:linear-gradient(135deg,var(--primary),#78d0ff);
  color:#fff;
  font-weight:900;
  box-shadow:0 10px 22px rgba(74,174,240,.22);
}
.brand-text{display:flex;flex-direction:column;line-height:1.1}
.brand-sub{font-size:11px;color:#9aa5b5;font-weight:800;margin-top:4px}
.sidebar-nav{flex:1;padding:14px 12px;overflow-y:auto}
.nav-item{
  display:flex;
  align-items:center;
  gap:11px;
  min-height:42px;
  padding:10px 12px;
  margin-bottom:4px;
  color:#526071;
  cursor:pointer;
  border-radius:14px;
  transition:background .16s,color .16s,transform .16s;
}
.nav-item:hover{background:var(--surface-2);color:var(--primary);transform:translateX(2px)}
.nav-item.active{
  background:linear-gradient(135deg,var(--primary-soft),#f7fbff);
  color:var(--primary);
  font-weight:800;
  box-shadow:inset 0 0 0 1px rgba(74,174,240,.12);
}
.nav-icon{
  width:26px;
  height:26px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:#f4f8fd;
  font-size:12px;
  font-weight:900;
  color:#7a8799;
}
.nav-item.active .nav-icon{background:#fff}
.sidebar-footer{
  padding:16px 22px;
  border-top:1px solid var(--line);
  font-size:12px;
  color:#9aa5b5;
}
.main{margin-left:236px;flex:1;display:flex;flex-direction:column;min-height:100vh}
.topbar{
  background:rgba(255,255,255,.82);
  border-bottom:1px solid var(--line);
  padding:0 34px;
  height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:blur(18px);
}
.topbar-left{display:flex;align-items:center;gap:12px;min-width:0}
.topbar-title{font-weight:900;font-size:17px;color:var(--text)}
.mobile-nav-button{display:none}
.topbar-right{display:flex;align-items:center;gap:14px;font-size:13px;color:var(--muted)}
.topbar-right .admin-name{
  font-weight:700;
  color:var(--text);
  background:#f4f8fd;
  border:1px solid var(--line);
  border-radius:999px;
  padding:7px 12px;
}
.topbar-right a{
  color:#627085;
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  padding:7px 12px;
}
.topbar-right a:hover{color:var(--primary);border-color:rgba(74,174,240,.35)}
.content{padding:30px 34px 42px;flex:1;max-width:1440px;width:100%}
.content,.card,.soft-panel,.metric-card,.table-wrap,.code-block{min-width:0}
.page-title{
  font-size:24px;
  font-weight:900;
  margin-bottom:22px;
  color:var(--text);
  letter-spacing:.2px;
}
.page-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  background:linear-gradient(135deg,#fff 0%,#f4fbff 62%,#edf7ff 100%);
  border:1px solid rgba(222,235,247,.95);
  border-radius:22px;
  box-shadow:var(--shadow);
  padding:24px 26px;
  margin-bottom:22px;
}
.page-hero .page-title{margin-bottom:6px}
.page-kicker{
  font-size:13px;
  color:var(--muted);
  line-height:1.7;
  max-width:760px;
}
.hero-mark{
  width:58px;
  height:58px;
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:20px;
  background:#fff;
  box-shadow:0 12px 26px rgba(74,174,240,.14);
  font-size:28px;
}
.dashboard-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(210px,1fr));
  gap:16px;
  margin-bottom:22px;
}
.action-card{
  display:flex;
  flex-direction:column;
  min-height:176px;
  padding:20px;
  border-radius:20px;
  background:#fff;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  color:var(--text);
  transition:transform .16s,box-shadow .16s,border .16s;
}
.action-card:hover{
  transform:translateY(-3px);
  box-shadow:0 18px 38px rgba(93,126,154,.14);
  border-color:rgba(74,174,240,.35);
  color:var(--text);
}
.action-card-icon{
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:16px;
  background:var(--primary-soft);
  font-size:13px;
  font-weight:900;
  color:var(--primary);
  margin-bottom:14px;
}
.action-card-title{font-size:16px;font-weight:900;margin-bottom:7px}
.action-card-desc{font-size:12px;color:var(--muted);line-height:1.55;flex:1}
.action-card-link{margin-top:18px;font-size:13px;font-weight:900;color:var(--primary)}
.config-grid{
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr);
  gap:20px;
  align-items:start;
}
.config-grid>*,.split-grid>*,.section-grid>*,.dashboard-grid>*,.mini-stat-grid>*,.parse-flow>*{min-width:0}
.mini-stat-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-bottom:18px;
}
.mini-stat{
  background:#f8fbff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
}
.mini-stat-value{font-size:22px;font-weight:900;color:var(--text);line-height:1}
.mini-stat-label{font-size:12px;color:var(--muted);margin-top:7px}
.info-callout{
  display:flex;
  gap:12px;
  align-items:flex-start;
  background:#f5fbff;
  border:1px solid #dcefff;
  color:#35627f;
  border-radius:16px;
  padding:14px 16px;
  font-size:13px;
  line-height:1.65;
  margin-bottom:18px;
}
.callout-icon{
  width:30px;
  height:30px;
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:#fff;
}
.form-actions{display:flex;align-items:center;gap:10px;margin-top:6px}
.justify-center{justify-content:center}
.page-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.section-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:16px;
  margin-bottom:22px;
}
.metric-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px;
  box-shadow:var(--shadow);
}
.metric-label{font-size:12px;color:var(--muted);font-weight:800;margin-bottom:9px}
.metric-value{font-size:28px;font-weight:900;color:var(--text);line-height:1}
.metric-desc{font-size:12px;color:var(--muted);line-height:1.55;margin-top:10px}
.soft-panel{
  background:#fbfdff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
}
.panel-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  font-size:13px;
  font-weight:900;
  color:#465266;
  margin-bottom:14px;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  height:26px;
  padding:0 10px;
  border-radius:999px;
  background:#f3f8fd;
  color:#5d7084;
  border:1px solid #e4edf7;
  font-size:12px;
  font-weight:900;
}
.pill-primary{background:var(--primary-soft);color:#1d7fb9;border-color:#d6ecfc}
.form-card-note{
  background:#fff;
  border:1px dashed #dbe8f5;
  border-radius:14px;
  color:#687789;
  font-size:12px;
  line-height:1.65;
  padding:12px 14px;
  margin-bottom:16px;
}
.video-list{
  display:grid;
  gap:10px;
}
.video-mini{
  display:grid;
  grid-template-columns:58px 1fr auto;
  gap:12px;
  align-items:center;
  padding:10px;
  background:#fbfdff;
  border:1px solid #edf3f9;
  border-radius:15px;
}
.video-thumb{
  width:58px;
  height:44px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#eaf6ff,#f8f0fb);
  color:var(--primary);
  font-weight:900;
}
.video-title{font-size:13px;font-weight:900;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.video-meta{font-size:12px;color:var(--muted);margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.video-score{
  min-width:42px;
  padding:5px 8px;
  border-radius:999px;
  background:#fff7df;
  color:#7a5700;
  font-size:12px;
  font-weight:900;
  text-align:center;
}
.check-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(210px,1fr));
  gap:12px;
  margin-bottom:20px;
}
.check-card{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:50px;
  background:#fbfdff;
  padding:12px 14px;
  border-radius:15px;
  cursor:pointer;
  border:1px solid var(--line);
  transition:border .15s,background .15s,transform .15s;
}
.check-card:hover{border-color:rgba(74,174,240,.45);background:#f6fbff;transform:translateY(-1px)}
.check-name{font-size:13px;font-weight:900;color:var(--text)}
.check-sub{font-size:11px;color:var(--muted);margin-left:auto}
.split-grid{
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  gap:20px;
  align-items:start;
}
.table-url{
  max-width:260px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.empty-cell{text-align:center;color:#9aa5b5;padding:28px!important}
.parse-flow{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-bottom:18px;
}
.flow-step{
  background:#fbfdff;
  border:1px solid var(--line);
  border-radius:15px;
  padding:13px;
}
.flow-step b{display:block;font-size:13px;color:var(--text);margin-bottom:5px}
.flow-step span{font-size:12px;color:var(--muted);line-height:1.5}
.flow-step em{font-style:normal;color:var(--primary);font-weight:900}
.inline-form{display:inline-flex;margin-right:6px}
.action-row{display:flex;align-items:center;gap:8px;white-space:nowrap}
.empty-state{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  min-height:120px;
  padding:26px 18px;
  color:#8b97a8;
  text-align:center;
}
.empty-icon{
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:16px;
  background:#f3f8fd;
  margin-bottom:10px;
  font-size:22px;
}
.empty-title{font-size:14px;font-weight:900;color:#526071;margin-bottom:5px}
.empty-desc{font-size:12px;color:#9aa5b5;line-height:1.6}
.code-block{
  background:#18212f;
  color:#dce9f6;
  border-radius:14px;
  padding:13px 14px;
  font-size:12px;
  line-height:1.6;
  overflow:auto;
}
.toolbar-strip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.toolbar-title{font-size:16px;font-weight:900;color:var(--text)}
.muted-text{font-size:13px;color:var(--muted);line-height:1.65}
.text-center{text-align:center}
.form-compact{max-width:420px}
.coming-soon{
  min-height:360px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.coming-soon-icon{
  width:72px;
  height:72px;
  margin:0 auto 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:26px;
  background:linear-gradient(135deg,#eaf6ff,#fff7df);
  box-shadow:0 16px 34px rgba(93,126,154,.12);
  font-size:34px;
}
.coming-soon-title{font-size:20px;font-weight:900;color:var(--text);margin-bottom:8px}
.coming-soon-desc{font-size:14px;color:var(--muted);line-height:1.75;max-width:460px}
.auth-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:30px 18px;
}
.auth-card{
  width:400px;
  max-width:100%;
  background:rgba(255,255,255,.96);
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:0 24px 60px rgba(93,126,154,.16);
  padding:34px;
}
.auth-logo{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:11px;
  font-size:24px;
  font-weight:900;
  margin-bottom:8px;
}
.auth-logo-left{justify-content:flex-start;margin-bottom:18px}
.auth-logo span{color:var(--primary)}
.auth-logo .brand-mark{color:#fff}
.auth-subtitle{text-align:center;font-size:13px;color:var(--muted);line-height:1.65;margin-bottom:26px}
.home-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:32px}
.home-card{
  width:760px;
  max-width:100%;
  background:rgba(255,255,255,.96);
  border:1px solid var(--line);
  border-radius:26px;
  box-shadow:0 24px 60px rgba(93,126,154,.16);
  padding:40px;
}
.home-title{font-size:30px;font-weight:900;color:var(--text);margin-bottom:12px}
.home-title span{color:var(--primary)}
.home-text{color:#526071;line-height:1.9;margin-bottom:24px}
.home-actions{display:flex;gap:12px;flex-wrap:wrap}
.home-meta{margin-top:24px;padding-top:18px;border-top:1px solid var(--line);color:var(--muted);font-size:13px;line-height:1.8}
.install-wrap{max-width:980px;margin:0 auto;padding:32px 18px 42px}
.install-head{text-align:center;margin-bottom:24px}
.install-head .auth-logo{margin-bottom:10px}
.install-subtitle{font-size:13px;color:var(--muted);line-height:1.7}
.readonly-addr{
  background:#f8fbff;
  color:#526071;
  border:1px solid var(--line);
  padding:11px 14px;
  border-radius:12px;
  font-size:13px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
}
.toggle-row{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.toggle-label{font-size:13px;color:#465266;font-weight:800}
.key-note{
  background:#f5fbff;
  border:1px solid #dcefff;
  border-radius:16px;
  padding:14px 16px;
  font-size:13px;
  color:#35627f;
  line-height:1.7;
}
.steps{display:grid;gap:10px}
.step{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fbfdff;
  font-size:13px;
}
.step-ok,.step-fail{
  width:24px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  font-weight:900;
}
.step-ok{background:#effbf4;color:#20883c}
.step-fail{background:#fff2f2;color:#d94242}
.step-msg{color:var(--muted);margin-left:auto}
.is-hidden{display:none}
.card{
  background:rgba(255,255,255,.96);
  border:1px solid rgba(231,237,245,.88);
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:24px;
  margin-bottom:20px;
}
.card-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:16px;
  font-weight:900;
  margin:-4px 0 18px;
  color:var(--text);
  padding-bottom:14px;
  border-bottom:1px solid var(--line);
}
.form-group{margin-bottom:17px}
.form-label{display:block;font-size:13px;color:#465266;margin-bottom:7px;font-weight:800}
.form-control{
  width:100%;
  padding:11px 14px;
  border:1px solid #dfe7f1;
  border-radius:12px;
  font-size:14px;
  color:var(--text);
  background:#fff;
  transition:border .15s,box-shadow .15s,background .15s;
  outline:none;
}
.form-control:hover{border-color:#cbd8e7}
.form-control:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(74,174,240,.13);
  background:#fff;
}
textarea.form-control{resize:vertical;min-height:96px;line-height:1.55}
.form-hint{font-size:12px;color:#8b97a8;margin-top:6px;line-height:1.5}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:38px;
  padding:9px 18px;
  border-radius:12px;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
  border:1px solid transparent;
  transition:background .15s,border .15s,color .15s,transform .15s,box-shadow .15s;
  text-decoration:none;
}
.btn:hover{transform:translateY(-1px);text-decoration:none}
.btn-primary{background:var(--primary);color:#fff;box-shadow:0 10px 22px rgba(74,174,240,.22)}
.btn-primary:hover{background:var(--primary-2);color:#fff}
.btn-danger{background:#fff2f2;color:#d94242;border-color:#ffd7d7}
.btn-danger:hover{background:var(--danger);color:#fff;border-color:var(--danger)}
.btn-secondary{background:#f7f9fc;color:#526071;border-color:var(--line)}
.btn-secondary:hover{background:#eef4fb;color:#334155}
.btn-success{background:#ecfbf1;color:#20883c;border-color:#ccefd7}
.btn-success:hover{background:var(--success);color:#fff;border-color:var(--success)}
.btn-sm{min-height:30px;padding:5px 11px;font-size:12px;border-radius:9px}
.btn-block{width:100%;margin-top:8px}
.alert{
  padding:13px 16px;
  border-radius:14px;
  margin-bottom:20px;
  font-size:13px;
  font-weight:700;
}
.alert-success{background:#effbf4;border:1px solid #ccefd7;color:#1f7a38}
.alert-danger{background:#fff2f2;border:1px solid #ffd7d7;color:#c93b3b}
.table-wrap{
  overflow-x:auto;
  max-width:100%;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  -webkit-overflow-scrolling:touch;
}
table{width:100%;border-collapse:separate;border-spacing:0}
th{
  background:#f8fbff;
  font-size:12px;
  font-weight:900;
  color:#5f6d7f;
  padding:13px 15px;
  text-align:left;
  border-bottom:1px solid var(--line);
  white-space:nowrap;
}
td{
  padding:13px 15px;
  border-bottom:1px solid #f0f4f8;
  font-size:13px;
  color:#334155;
  vertical-align:middle;
}
tr:last-child td{border-bottom:none}
tr:hover td{background:#fbfdff}
code{
  display:inline-block;
  background:#f3f7fb;
  color:#36566f;
  border:1px solid #e3ebf4;
  border-radius:8px;
  padding:3px 7px;
  font-size:12px;
}
.badge{display:inline-flex;align-items:center;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:900}
.badge-on{background:#effbf4;color:#20883c}
.badge-off{background:#f1f4f8;color:#8490a1}
.wip{
  display:inline-flex;
  align-items:center;
  background:#fff7df;
  color:#8a6500;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  margin-left:4px;
}
select.form-control{
  appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b97a8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  padding-right:36px;
}
input[type=checkbox]{accent-color:var(--primary)}
@media (max-width:900px){
  body{overflow-x:hidden}
  .layout{display:flex}
  .sidebar{
    width:min(82vw,300px);
    position:fixed;
    top:0;
    left:0;
    height:100vh;
    z-index:120;
    transform:translateX(-104%);
    transition:transform .22s ease;
    box-shadow:0 22px 70px rgba(23,24,39,.18);
  }
  .nav-toggle:checked ~ .sidebar{transform:translateX(0)}
  .sidebar-scrim{
    display:block;
    position:fixed;
    inset:0;
    z-index:110;
    background:rgba(23,24,39,.34);
    opacity:0;
    pointer-events:none;
    transition:opacity .2s ease;
    backdrop-filter:blur(2px);
  }
  .nav-toggle:checked ~ .sidebar-scrim{opacity:1;pointer-events:auto}
  .main{margin-left:0}
  .topbar{height:58px;padding:0 14px}
  .topbar-title{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-nav-button{
    width:38px;
    height:38px;
    flex:0 0 auto;
    display:inline-flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    border:1px solid var(--line);
    border-radius:13px;
    background:#fff;
    box-shadow:0 8px 20px rgba(93,126,154,.10);
    cursor:pointer;
  }
  .mobile-nav-button span{
    width:16px;
    height:2px;
    border-radius:99px;
    background:#526071;
  }
  .topbar-right{gap:8px}
  .topbar-right .admin-name{display:none}
  .topbar-right a{padding:7px 10px}
  .content{padding:22px 14px 34px;max-width:100vw;overflow-x:hidden}
  .page-hero{padding:18px;border-radius:18px}
  .card{padding:18px;border-radius:16px}
  .soft-panel{padding:14px}
  .toolbar-strip{align-items:flex-start;flex-direction:column}
  table{min-width:720px}
  .form-row{grid-template-columns:1fr}
  .config-grid,.split-grid{grid-template-columns:1fr}
  .mini-stat-grid,.parse-flow{grid-template-columns:1fr}
  .page-hero{align-items:flex-start;flex-direction:column}
}
