/* jobsitesys 三端功能说明 — 样式对齐官网 index.html + 参考页侧栏交互 */

@import url("../../fonts/fonts.css");

:root {
  --bg: #f7f6f3;
  --bg-soft: #efece6;
  --sidebar-bg: #ffffff;
  --content-bg: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5f5f5f;
  --border: #e5e1d8;
  --primary: #3c8dbc;
  --primary-dark: #367fa9;
  --primary-soft: rgba(60, 141, 188, 0.12);
  --gold: #ddb47d;
  --sidebar-width: 300px;
  --topbar-height: 52px;
  --font: "Manrope", "Noto Sans SC", sans-serif;
  --mono: "Cascadia Code", "Consolas", "Courier New", monospace;
  --shadow: 0 18px 50px rgba(26, 26, 26, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow: hidden;
}

.sidebar-header {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}

.sidebar-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.sidebar-desc {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0.75rem 1rem;
}

.sidebar-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-nav > ul > li { margin-bottom: 0.15rem; }

.sidebar-nav a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.45;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.sidebar-nav .nav-item.active > a,
.sidebar-nav .nav-group.active > .nav-link {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.nav-sub {
  margin: 0.15rem 0 0.35rem 0.65rem;
  padding-left: 0.55rem;
  border-left: 2px solid var(--border);
}

.nav-sub a {
  font-size: 0.92rem;
  color: var(--text-muted);
  padding: 0.38rem 0.6rem;
}

.nav-sub a:hover,
.nav-sub a.active { color: var(--primary); }

.nav-has-modules.active > a { font-weight: 600; }

.nav-sub-sub {
  display: none;
  margin: 0.1rem 0 0.25rem 0.5rem;
  padding-left: 0.45rem;
  border-left: 1px dashed var(--border);
}

.nav-has-modules.expanded .nav-sub-sub {
  display: block;
}

.nav-modules-toggle {
  position: relative;
  padding-right: 1.4rem !important;
}

.nav-modules-toggle::after {
  content: "›";
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  transition: transform 0.15s ease;
}

.nav-has-modules.expanded > .nav-modules-toggle::after {
  transform: translateY(-50%) rotate(90deg);
  color: var(--primary);
}

.nav-sub-sub a {
  font-size: 0.86rem;
  padding: 0.32rem 0.5rem;
  color: var(--text-muted);
}

.nav-sub-sub a.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-mid {
  font-size: 0.76rem;
  color: #999;
  font-weight: 500;
}

.sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-muted);
}

.sidebar-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.sidebar-footer a:hover { text-decoration: underline; }

/* Main */
.main-wrap {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.5rem;
  background: rgba(247, 246, 243, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--font);
}

.topbar-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.content {
  flex: 1;
  padding: 2rem 2.5rem 2rem;
  max-width: 1040px;
}

.site-footer {
  margin-left: var(--sidebar-width);
  border-top: 1px solid var(--border);
  padding: 28px 2.5rem 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--bg);
}

.site-footer .footer-row {
  max-width: 960px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.site-footer a {
  color: var(--primary);
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

.footer-links { display: flex; gap: 18px; }

/* Doc sections */
.doc-section { display: none; }
.doc-section.active { display: block; }

.doc-section h1,
.doc-section h2,
.doc-section h3,
.doc-section h4 {
  scroll-margin-top: calc(var(--topbar-height) + 12px);
}

.doc-section h1 {
  font-size: 1.75rem;
  margin: 0 0 1rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.doc-section h2.section-heading {
  font-size: 1.5rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
  font-weight: 700;
}

.doc-section h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.doc-section h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.65rem;
  color: var(--text);
  font-weight: 700;
}

.doc-section h4 {
  font-size: 0.95rem;
  margin: 1.1rem 0 0.5rem;
  font-weight: 600;
}

.doc-section p { margin: 0.65rem 0; }

.doc-section ul,
.doc-section ol {
  margin: 0.65rem 0;
  padding-left: 1.35rem;
}

.doc-section li { margin: 0.25rem 0; }

.doc-section blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
  color: #374151;
}

.doc-section blockquote p { margin: 0.35rem 0; }

.doc-section .notice-important {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border-left: 3px solid #dc2626;
  border-radius: 0 10px 10px 0;
  color: #b91c1c;
  font-weight: 500;
}

.doc-section hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.doc-section code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--bg-soft);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
}

.doc-section pre {
  background: #222d32;
  color: #e2e8f0;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1rem 0;
  font-size: 0.84rem;
  line-height: 1.5;
}

.doc-section pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.doc-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.88rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.doc-section thead { background: var(--bg-soft); }

.doc-section th,
.doc-section td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.doc-section th {
  font-weight: 600;
  color: var(--text);
}

.doc-section tbody tr:nth-child(even) { background: #fafafa; }

/* Feature cards & images */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 1rem 0;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 10px 28px rgba(0,0,0,.04);
}

.feature-card h4 {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 0.95rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.doc-figure {
  margin: 1.25rem 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.doc-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.doc-figure figcaption {
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0.75rem 0 1rem;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 1rem 0;
}

.flow-step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  font-size: 0.82rem;
}

.flow-step .num {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.flow-step strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
}

/* Module detail showcase */
.modules-detail-wrap {
  margin: 1.5rem 0 0;
}

.module-detail {
  margin: 2rem 0 2.5rem;
  padding-top: 0.5rem;
  scroll-margin-top: calc(var(--topbar-height) + 16px);
}

.module-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.module-detail-head h4 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.module-id-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--mono);
}

.module-showcase {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #faf9f7 0%, #f0f4f8 50%, #faf9f7 100%);
  box-shadow: 0 20px 60px rgba(26, 26, 26, 0.07);
  margin-bottom: 1.25rem;
}

.module-showcase.reverse .showcase-visual { order: 2; }
.module-showcase.reverse .showcase-copy { order: 1; }

.showcase-visual {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 30%, rgba(60,141,188,0.08), transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(221,180,125,0.12), transparent 45%);
}

.showcase-visual img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
  display: block;
}

.showcase-copy {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.showcase-tag {
  display: inline-block;
  width: fit-content;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.tag-employer { background: rgba(60,141,188,0.15); color: var(--primary); }
.tag-seeker { background: rgba(221,180,125,0.25); color: #9a6b2e; }
.tag-admin { background: rgba(34,45,50,0.1); color: #222d32; }

.showcase-copy h5 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.showcase-intro {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.showcase-points { display: flex; flex-direction: column; gap: 12px; }

.showcase-point {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.showcase-point-icon {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.showcase-point strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.showcase-point p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.module-detail-body {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}

.module-detail-body h5 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 700;
}

.module-detail-body h5:not(:first-child) { margin-top: 16px; }

.module-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.module-steps li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
  font-size: 0.88rem;
  border-bottom: 1px dashed var(--border);
}

.module-steps li:last-child { border-bottom: none; }

.step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
}

.module-tips {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* FAQ */
.faq-list { margin: 1rem 0; }

.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item summary:hover { background: var(--bg-soft); }

.faq-answer {
  padding: 0 18px 14px;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.faq-answer p {
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .main-wrap,
  .site-footer { margin-left: 0; }
  .menu-toggle { display: inline-block; }
  .content { padding: 1.25rem 1rem 2rem; }
  .site-footer { padding: 20px 1rem 32px; }
  .feature-grid { grid-template-columns: 1fr; }
  .flow-steps { grid-template-columns: 1fr 1fr; }
  .module-showcase,
  .module-showcase.reverse { grid-template-columns: 1fr; }
  .module-showcase.reverse .showcase-visual,
  .module-showcase.reverse .showcase-copy { order: unset; }
  .showcase-copy { padding: 20px 18px; }
}

@media print {
  .sidebar, .topbar, .site-footer { display: none; }
  .main-wrap { margin-left: 0; }
  .doc-section { display: block !important; }
}
