:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --panel:#eef3ff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#dbe4f0;
  --brand:#0f766e;
  --brand-2:#115e59;
  --danger:#dc2626;
  --warn:#d97706;
  --ok:#16a34a;
  --shadow:0 14px 30px rgba(15,23,42,.08);
  --radius:16px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:"PingFang SC","Microsoft YaHei",ui-sans-serif,system-ui,-apple-system,sans-serif;
  background:linear-gradient(180deg,#f7fafc 0%, #eff4fb 100%);
  color:var(--text);
}
#watermarkLayer{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:10;
  opacity:.035;
  font-size:13px;
  font-weight:600;
  color:#1f2937;
  letter-spacing:1px;
  display:flex;
  flex-wrap:wrap;
  transform:rotate(-18deg);
  text-shadow:0 0 1px rgba(0,0,0,.12);
}
.watermarkItem{
  width:240px;
  height:130px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  box-sizing:border-box;
  white-space:nowrap;
}
a{color:inherit}
.hp-header{
  background:linear-gradient(135deg,var(--brand),var(--brand-2));
  color:#fff;
  box-shadow:0 10px 25px rgba(15,118,110,.18);
  position:relative;
  z-index:1000;
}
.hp-nav{
  max-width:1360px;
  margin:0 auto;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.hp-brand{
  font-size:18px;
  font-weight:800;
  letter-spacing:.3px;
  flex:0 0 auto;
  white-space:nowrap;
}
.hp-links{
  display:flex;
  gap:8px;
  flex-wrap:nowrap;
  align-items:center;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
  -ms-overflow-style:none;
  flex:1 1 auto;
  justify-content:flex-end;
}
.hp-links::-webkit-scrollbar{display:none}
.hp-link,.hp-chip-btn{
  border:1px solid rgba(255,255,255,.24);
  background:rgba(255,255,255,.14);
  color:#fff;
  text-decoration:none;
  border-radius:999px;
  padding:7px 11px;
  font-size:12px;
  line-height:1.2;
  cursor:pointer;
  white-space:nowrap;
  flex:0 0 auto;
}
.hp-link.active{background:#fff;color:var(--brand-2);border-color:#fff;font-weight:700}
.hp-nav-menu{
  position:relative;
  flex:0 0 auto;
}
.hp-nav-trigger{
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.hp-nav-trigger::after{
  content:"▾";
  font-size:10px;
  line-height:1;
  opacity:.9;
}
.hp-nav-submenu{
  display:none;
  position:fixed;
  top:0;
  left:0;
  min-width:112px;
  padding:8px;
  border:1px solid rgba(15,118,110,.14);
  border-radius:14px;
  background:#fff;
  box-shadow:0 16px 36px rgba(15,23,42,.18);
  z-index:2000;
}
.hp-nav-menu.open .hp-nav-submenu{
  display:grid;
  gap:6px;
}
.hp-nav-submenu .hp-link{
  display:block;
  width:100%;
  border-color:#dbe4f0;
  background:#f8fafc;
  color:#0f172a;
  border-radius:10px;
  text-align:left;
}
.hp-nav-submenu .hp-link.active{
  background:#0f766e;
  color:#fff;
  border-color:#0f766e;
}
.hp-wrap{max-width:1200px;margin:24px auto;padding:0 20px;position:relative;z-index:2}
.hp-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}
.hp-card + .hp-card{margin-top:18px}
.hp-title{margin:0;font-size:22px;font-weight:800}
.hp-sub{margin-top:6px;color:var(--muted);font-size:13px;line-height:1.7}
.hp-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-top:18px}
.hp-stat{
  border:1px solid var(--line);
  border-radius:14px;
  background:linear-gradient(180deg,#fff,#f8fbff);
  padding:16px;
}
.hp-stat-label{font-size:12px;color:var(--muted)}
.hp-stat-value{font-size:28px;font-weight:800;margin-top:8px}
.hp-btn{
  border:none;
  background:linear-gradient(180deg,var(--brand),var(--brand-2));
  color:#fff;
  border-radius:12px;
  padding:10px 16px;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
}
.hp-btn.secondary{
  background:#fff;
  color:var(--text);
  border:1px solid var(--line);
}
.hp-btn.danger{
  background:linear-gradient(180deg,#ef4444,#dc2626);
}
.hp-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.hp-badge{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}
.hp-badge.ok{background:#dcfce7;color:#166534}
.hp-badge.warn{background:#fef3c7;color:#92400e}
.hp-badge.bad{background:#fee2e2;color:#991b1b}
.hp-badge.info{background:#e0f2fe;color:#0c4a6e}
table{width:100%;border-collapse:collapse;margin-top:16px}
th,td{padding:12px 10px;border-bottom:1px solid var(--line);text-align:left;font-size:14px;vertical-align:middle}
th{font-size:12px;color:var(--muted);font-weight:700}
tbody tr:hover{background:#f8fbff}
select,input{
  border:1px solid var(--line);
  border-radius:10px;
  padding:9px 10px;
  font-size:14px;
  background:#fff;
}
.hp-actions{display:flex;gap:8px;flex-wrap:wrap}
.hp-empty{
  margin-top:16px;
  padding:18px;
  border:1px dashed var(--line);
  border-radius:14px;
  color:var(--muted);
  background:#fbfdff;
}
.hp-login{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.hp-login-card{
  width:min(440px,100%);
  background:var(--card);
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow);
  padding:24px;
}
.hp-login-card h1{margin:0;font-size:28px}
.hp-login-card form{margin-top:18px;display:grid;gap:12px}
.hp-login-card input{width:100%}
.hp-tip{font-size:12px;color:var(--muted);line-height:1.7}
.hp-toast{
  position:fixed;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
  z-index:9999;
  max-width:min(420px, 86vw);
  min-width:220px;
  padding:14px 18px;
  border-radius:14px;
  color:#fff;
  background:rgba(15,23,42,.92);
  box-shadow:0 16px 30px rgba(15,23,42,.25);
  text-align:center;
  font-weight:700;
}

@media (max-width: 900px){
  .hp-nav{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }
  .hp-links{
    justify-content:flex-start;
    width:100%;
    padding-bottom:2px;
  }
  .hp-wrap{
    margin:18px auto;
    padding:0 14px;
  }
  .hp-card{
    padding:16px;
    border-radius:14px;
  }
  .hp-title{
    font-size:20px;
  }
  .hp-stat-value{
    font-size:24px;
  }
  .hp-grid{
    grid-template-columns:1fr;
  }
  .hp-row{
    align-items:stretch;
  }
}

@media (max-width: 640px){
  body{
    font-size:14px;
    overflow-x:hidden;
  }
  .hp-header{
    position:sticky;
    top:0;
    z-index:50;
  }
  .hp-nav{
    padding:10px 10px 8px;
    gap:8px;
  }
  .hp-brand{
    font-size:16px;
  }
  .hp-links{
    justify-content:flex-start;
    padding:2px 0 4px;
    gap:8px;
    scroll-snap-type:x proximity;
  }
  .hp-link,.hp-chip-btn{
    min-height:40px;
    padding:9px 12px;
    font-size:13px;
    display:inline-flex;
    align-items:center;
    scroll-snap-align:start;
  }
  .hp-wrap{
    margin:14px auto;
    padding:0 8px;
  }
  .hp-card{
    padding:14px;
    border-radius:12px;
    overflow:hidden;
  }
  .hp-title{
    font-size:18px;
  }
  .hp-sub,
  .hp-tip{
    font-size:12px;
  }
  .hp-stat{
    padding:14px;
  }
  .hp-stat-value{
    font-size:22px;
  }
  .hp-badge{
    font-size:11px;
    padding:4px 8px;
  }
  .hp-actions{
    gap:6px;
  }
  .hp-btn{
    width:100%;
    min-height:44px;
    justify-content:center;
    display:inline-flex;
    align-items:center;
  }
  select,input,textarea{
    font-size:16px;
    min-height:44px;
  }
  table{
    display:block;
    overflow-x:auto;
    white-space:nowrap;
    -webkit-overflow-scrolling:touch;
  }
}
