﻿/* =========================================================================
   机器人抛光工作站安全系统设计文档 - 工业风样式表
   ========================================================================= */

:root {
  --color-primary: #0f2847;
  --color-primary-light: #1e3a5f;
  --color-accent: #ff6b35;
  --color-accent-dark: #e85d2c;
  --color-success: #10b981;
  --color-success-dark: #059669;
  --color-info: #0ea5e9;
  --color-info-dark: #0284c7;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-bg: #f6f8fb;
  --color-bg-card: #ffffff;
  --color-bg-sidebar: #0f2847;
  --color-bg-code: #f1f5f9;
  --color-bg-warning: #fff8dc;
  --color-bg-danger: #fef2f2;
  --color-bg-info: #eff6ff;
  --color-text: #1f2937;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;
  --color-text-on-dark: #e2e8f0;
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow-sm: 0 1px 2px rgba(15,40,71,0.05);
  --shadow: 0 2px 8px rgba(15,40,71,0.08);
  --shadow-lg: 0 8px 24px rgba(15,40,71,0.12);
  --font-sans: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--font-sans); font-size: 15px; line-height: 1.7; color: var(--color-text); background: var(--color-bg); -webkit-font-smoothing: antialiased; }
a { color: var(--color-info-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar { position: fixed; top: 0; left: 0; right: 0; height: 60px; background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%); color: #fff; display: flex; align-items: center; padding: 0 24px; box-shadow: var(--shadow); z-index: 100; }
.topbar-logo { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.topbar-logo .logo-mark { width: 32px; height: 32px; background: var(--color-accent); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px; box-shadow: 0 0 12px rgba(255,107,53,0.5); }
.topbar-meta { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 13px; opacity: 0.9; }
.topbar-meta .badge { background: rgba(255,255,255,0.15); padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.5px; }
.topbar-meta .btn-print { background: var(--color-accent); color: #fff; border: none; padding: 6px 14px; border-radius: var(--radius-sm); cursor: pointer; font-size: 12px; font-weight: 600; transition: background 0.2s; }
.topbar-meta .btn-print:hover { background: var(--color-accent-dark); }

.sidebar { position: fixed; top: 60px; left: 0; bottom: 0; width: 260px; background: var(--color-bg-sidebar); color: var(--color-text-on-dark); overflow-y: auto; padding: 20px 0; z-index: 50; }
.sidebar-title { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--color-text-light); text-transform: uppercase; padding: 0 20px 12px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 12px; }
.toc-list { list-style: none; }
.toc-list li a { display: block; padding: 9px 20px; color: var(--color-text-on-dark); font-size: 13px; border-left: 3px solid transparent; transition: all 0.15s; }
.toc-list li a:hover { background: rgba(255,255,255,0.06); text-decoration: none; }
.toc-list li a.active { background: rgba(255,107,53,0.12); border-left-color: var(--color-accent); color: #fff; font-weight: 600; }

.main { margin-left: 260px; margin-top: 60px; padding: 32px 40px 80px; max-width: 1100px; }

.hero { background: linear-gradient(135deg, var(--color-primary) 0%, #1e3a5f 60%, #2a4a73 100%); color: #fff; border-radius: 12px; padding: 40px 36px; margin-bottom: 28px; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero::before { content: ""; position: absolute; top: -50%; right: -10%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(255,107,53,0.3) 0%, transparent 70%); border-radius: 50%; }
.hero-version { display: inline-block; background: var(--color-accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 1px; padding: 4px 10px; border-radius: 4px; margin-bottom: 12px; position: relative; }
.hero h1 { font-size: 30px; font-weight: 800; line-height: 1.3; margin-bottom: 12px; position: relative; }
.hero-sub { font-size: 14px; opacity: 0.85; margin-bottom: 20px; position: relative; }
.hero-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; position: relative; }
.hero-meta-item { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; padding: 10px 14px; backdrop-filter: blur(8px); }
.hero-meta-item .label { font-size: 11px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; }
.hero-meta-item .value { font-size: 14px; font-weight: 600; }

.section { background: var(--color-bg-card); border-radius: 12px; padding: 28px 32px; margin-bottom: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); }
.section h2 { font-size: 22px; color: var(--color-primary); padding-bottom: 10px; margin-bottom: 18px; border-bottom: 2px solid var(--color-accent); display: flex; align-items: center; gap: 10px; }
.section h2::before { content: ""; display: inline-block; width: 4px; height: 22px; background: var(--color-accent); border-radius: 2px; }
.section h3 { font-size: 17px; color: var(--color-primary-light); margin: 22px 0 10px; padding-left: 12px; border-left: 3px solid var(--color-info); }
.section p { margin-bottom: 12px; color: #374151; }
.section ul, .section ol { margin: 8px 0 12px 24px; }
.section li { margin-bottom: 6px; color: #374151; }

.chip { display: inline-block; background: #e0f2fe; color: #075985; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; margin-right: 4px; }
.chip.danger { background: #fee2e2; color: #991b1b; }
.chip.success { background: #d1fae5; color: #065f46; }
.chip.warning { background: #fef3c7; color: #92400e; }

.callout { display: flex; gap: 12px; padding: 14px 18px; border-radius: var(--radius); margin: 14px 0; border-left: 4px solid; font-size: 14px; }
.callout-icon { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 13px; }
.callout-body { flex: 1; }
.callout strong { display: block; margin-bottom: 4px; }
.callout.warning { background: var(--color-bg-warning); border-color: var(--color-warning); color: #78350f; }
.callout.warning .callout-icon { background: var(--color-warning); }
.callout.danger { background: var(--color-bg-danger); border-color: var(--color-danger); color: #7f1d1d; }
.callout.danger .callout-icon { background: var(--color-danger); }
.callout.info { background: var(--color-bg-info); border-color: var(--color-info); color: #0c4a6e; }
.callout.info .callout-icon { background: var(--color-info); }
.callout.success { background: #ecfdf5; border-color: var(--color-success); color: #064e3b; }
.callout.success .callout-icon { background: var(--color-success); }

pre, code { font-family: var(--font-mono); font-size: 13px; }
code { background: var(--color-bg-code); padding: 1px 6px; border-radius: 3px; color: #be185d; }
pre { background: #1e293b; color: #e2e8f0; padding: 16px 20px; border-radius: var(--radius); overflow-x: auto; margin: 12px 0; line-height: 1.6; border: 1px solid #334155; }
pre code { background: none; color: inherit; padding: 0; }

.table-wrap { overflow-x: auto; margin: 14px 0; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; font-size: 14px; }
thead { background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%); }
th { text-align: left; padding: 10px 14px; font-weight: 700; color: var(--color-primary); border-bottom: 2px solid var(--color-border-strong); font-size: 13px; }
td { padding: 10px 14px; border-bottom: 1px solid var(--color-border); color: #374151; }
tbody tr:hover { background: #f8fafc; }
tbody tr:last-child td { border-bottom: none; }

.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 14px 0; }
.status-card { background: linear-gradient(135deg, #fff 0%, #f8fafc 100%); border: 1px solid var(--color-border); border-left: 4px solid var(--color-info); border-radius: var(--radius); padding: 14px 16px; }
.status-card.danger { border-left-color: var(--color-danger); }
.status-card.success { border-left-color: var(--color-success); }
.status-card.warning { border-left-color: var(--color-warning); }
.status-card .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--color-text-muted); font-weight: 600; margin-bottom: 4px; }
.status-card .value { font-size: 18px; font-weight: 700; color: var(--color-primary); font-family: var(--font-mono); }
.status-card .desc { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }

.figure { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px; margin: 16px 0; text-align: center; }
.figure img, .figure svg { max-width: 100%; height: auto; }
.figure-caption { font-size: 12px; color: var(--color-text-muted); margin-top: 10px; font-style: italic; }

.steps { counter-reset: step; padding: 0; list-style: none; margin: 14px 0; }
.steps li { counter-increment: step; position: relative; padding: 10px 12px 10px 50px; margin-bottom: 8px; background: #f8fafc; border-radius: var(--radius-sm); border: 1px solid var(--color-border); }
.steps li::before { content: counter(step); position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; background: var(--color-accent); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }

.progress-bar { position: fixed; top: 60px; left: 0; height: 3px; background: var(--color-accent); width: 0%; z-index: 99; transition: width 0.1s; }

.back-to-top { position: fixed; right: 24px; bottom: 24px; width: 44px; height: 44px; background: var(--color-primary); color: #fff; border: none; border-radius: 50%; cursor: pointer; display: none; align-items: center; justify-content: center; font-size: 18px; box-shadow: var(--shadow); z-index: 90; transition: background 0.2s; }
.back-to-top:hover { background: var(--color-accent); }
.back-to-top.visible { display: flex; }

.footer { margin-top: 40px; padding: 24px; text-align: center; color: var(--color-text-muted); font-size: 12px; border-top: 1px solid var(--color-border); }
.footer strong { color: var(--color-primary); }

@media (max-width: 900px) { .sidebar { display: none; } .main { margin-left: 0; padding: 20px 18px 60px; } .topbar { padding: 0 16px; } .topbar-meta { gap: 8px; font-size: 11px; } .hero { padding: 28px 22px; } .hero h1 { font-size: 22px; } .section { padding: 20px 18px; } .section h2 { font-size: 18px; } }

@media print { .topbar, .sidebar, .progress-bar, .back-to-top, .topbar-meta .btn-print { display: none !important; } body { background: #fff; } .main { margin: 0; padding: 0; max-width: 100%; } .section { box-shadow: none; border: none; page-break-inside: avoid; margin-bottom: 16px; padding: 16px 0; } .hero { background: var(--color-primary) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; page-break-after: avoid; } pre, .figure, table { page-break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; } a { color: inherit; text-decoration: none; } }