/* puidc-idp 公共样式 —— 浅色商务、全屏通栏、轻量动态 */
:root {
  --bg: #f4f6fa;
  --bg-soft: #eef2f9;
  --card: #ffffff;
  --line: #e2e8f2;
  --line-strong: #cdd8e8;
  --text: #10233b;
  --text-2: #55677f;
  --text-3: #8295ad;
  --primary: #1d5fd6;
  --primary-dark: #1649ad;
  --primary-soft: #e8f0fe;
  --success: #1a9e6c;
  --warning: #d98a16;
  --danger: #d64545;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(16, 35, 59, .08);
  --shadow-sm: 0 2px 8px rgba(16, 35, 59, .06);
  --maxw: 1440px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* ---------- 顶部导航 ---------- */
.site-header {
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-links a {
  color: var(--text-2);
  font-size: 14.5px;
}
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-links .nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
}
.nav-links .nav-cta:hover { background: var(--primary-dark); }

/* ---------- 主体 ---------- */
.site-main {
  flex: 1;
  width: 100%;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 96px) 0;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .5;
  pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
}
.hero-blob.b1 {
  width: 420px; height: 420px;
  background: #cfe0ff;
  top: -120px; left: -80px;
}
.hero-blob.b2 {
  width: 380px; height: 380px;
  background: #d8f0e6;
  bottom: -140px; right: -60px;
  animation-delay: -7s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(30px, 20px) scale(1.08); }
}

.hero-inner { position: relative; max-width: 760px; }

.hero h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.25;
  margin: 0 0 18px;
  letter-spacing: -.5px;
}

.hero p.lead {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--text-2);
  margin: 0 0 32px;
  max-width: 620px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }

.btn-outline {
  background: #fff; color: var(--primary);
  border-color: var(--line-strong);
}
.btn-outline:hover { border-color: var(--primary); text-decoration: none; }

.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-soft); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b83a3a; }

.btn-sm { padding: 6px 12px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* ---------- 卡片栅格 ---------- */
.section { padding: clamp(32px, 5vw, 56px) 0; }

.grid {
  display: grid;
  gap: 22px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }

.card h3 { margin: 0 0 10px; font-size: 17px; }
.card p { margin: 0; color: var(--text-2); font-size: 14.5px; }

.card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

/* ---------- 表单 ---------- */
.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 3.4vw, 36px);
  max-width: 460px;
  margin: 0 auto;
}

.form-wide { max-width: 720px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}
.field .hint { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }

.input, select.input, textarea.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.input-row { display: flex; gap: 10px; }
.input-row .input { flex: 1; }

.form-error {
  background: #fdeeee;
  color: var(--danger);
  border: 1px solid #f5c6c6;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 16px;
}
.form-ok {
  background: #ecf8f2;
  color: var(--success);
  border: 1px solid #bfe8d4;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* ---------- 安全徽章 ---------- */
.trust-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ecf8f2;
  border: 1px solid #bfe8d4;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 18px;
}
.trust-badge__main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  min-width: 0;
}
.trust-badge__main strong { color: var(--success); font-weight: 600; }
.trust-badge__icon { width: 18px; height: 18px; flex: none; }
.trust-badge__tls {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--success);
  white-space: nowrap;
}
@media (max-width: 480px) {
  .trust-badge { flex-direction: column; align-items: flex-start; gap: 6px; }
}

.form-foot {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--text-2);
}

/* ---------- 页面标题 ---------- */
.page-head { margin-bottom: 28px; }
.page-head h2 { margin: 0 0 6px; font-size: 26px; }
.page-head p { margin: 0; color: var(--text-2); }

/* ---------- 表格 ---------- */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th, .table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.table th {
  background: var(--bg-soft);
  color: var(--text-2);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.table tr:last-child td { border-bottom: none; }
.table td .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

/* ---------- 标签 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.badge-active { background: #ecf8f2; color: var(--success); }
.badge-disabled { background: #f1f3f7; color: var(--text-3); }
.badge-pending { background: #fdf3e3; color: var(--warning); }
.badge-approved { background: var(--primary-soft); color: var(--primary); }

/* ---------- 后台布局 ---------- */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}

.admin-side {
  background: #0f1f33;
  color: #c8d6e8;
  padding: 22px 0;
}
.admin-side .side-item {
  display: block;
  padding: 12px 24px;
  color: #c8d6e8;
  font-size: 14.5px;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.admin-side .side-item:hover { background: #16294a; text-decoration: none; }
.admin-side .side-item.active {
  background: #16294a;
  border-left-color: var(--primary);
  color: #fff;
}
.admin-side .side-title {
  padding: 0 24px 12px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6d82a0;
}

.admin-body { padding: 28px clamp(20px, 3vw, 36px); }

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.admin-toolbar .filters { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  color: var(--text-3);
  font-size: 13px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- 弹窗提示 ---------- */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  z-index: 100;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--success); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .admin-layout { grid-template-columns: 200px 1fr; }
}
@media (max-width: 720px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { display: flex; overflow-x: auto; padding: 0; }
  .admin-side .side-item { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .nav-links { gap: 14px; }
}
