/* ===== SpiderDesk Documentation — Design System ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0f1117;
  --bg-secondary: #161822;
  --bg-sidebar: #12141e;
  --bg-card: #1c1f2e;
  --bg-card-hover: #242840;
  --bg-code: #1a1d2e;
  --accent: #f97316;
  --accent-hover: #fb923c;
  --accent-subtle: rgba(249,115,22,0.12);
  --blue: #3b82f6;
  --green: #10b981;
  --red: #ef4444;
  --purple: #8b5cf6;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #2a2d3e;
  --border-light: #353849;
  --sidebar-width: 280px;
  --header-height: 60px;
  --radius: 12px;
  --radius-sm: 8px;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 15px;
}

/* ===== Header ===== */
.docs-header {
  position: fixed; top:0; left:0; right:0; z-index:100;
  height: var(--header-height);
  background: rgba(15,17,23,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px;
}
.docs-header .logo { display:flex; align-items:center; gap:10px; text-decoration:none; }
.docs-header .logo img { height:28px; }
.docs-header .logo-text { font-weight:700; font-size:18px; color:var(--text-primary); }
.docs-header .logo-tag { font-size:11px; background:var(--accent); color:#fff; padding:2px 8px; border-radius:20px; font-weight:600; margin-left:8px; }
.docs-header nav { margin-left:auto; display:flex; gap:20px; align-items:center; }
.docs-header nav a { color:var(--text-secondary); text-decoration:none; font-size:14px; font-weight:500; transition:.2s; }
.docs-header nav a:hover { color:var(--accent); }

/* ===== Sidebar ===== */
.docs-sidebar {
  position: fixed; top: var(--header-height); left:0; bottom:0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  overflow-y: auto; padding: 20px 0;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.sidebar-section { margin-bottom: 8px; }
.sidebar-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-muted); padding: 12px 20px 6px; user-select:none;
}
.sidebar-link {
  display: flex; align-items:center; gap:8px;
  padding: 8px 20px; font-size: 13.5px; color: var(--text-secondary);
  text-decoration:none; transition: .15s; border-left: 3px solid transparent;
}
.sidebar-link:hover { color:var(--text-primary); background:var(--bg-card); }
.sidebar-link.active {
  color: var(--accent); background: var(--accent-subtle);
  border-left-color: var(--accent); font-weight: 600;
}
.sidebar-link .icon { font-size:16px; width:20px; text-align:center; flex-shrink:0; }

/* ===== Main Content ===== */
.docs-main {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  padding: 40px 48px 80px;
  max-width: 960px;
}

/* ===== Section ===== */
.doc-section { margin-bottom: 64px; scroll-margin-top: calc(var(--header-height) + 20px); }
.doc-section h1 { font-size:32px; font-weight:800; margin-bottom:8px; color:var(--text-primary); }
.doc-section h2 { font-size:24px; font-weight:700; margin:40px 0 16px; color:var(--text-primary); border-bottom:1px solid var(--border); padding-bottom:8px; }
.doc-section h3 { font-size:18px; font-weight:600; margin:28px 0 12px; color:var(--text-primary); }
.doc-section p { color:var(--text-secondary); margin-bottom:16px; }
.section-subtitle { font-size:16px; color:var(--text-muted); margin-bottom:24px; font-weight:400; }

/* ===== Feature Cards ===== */
.feature-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px; margin:20px 0; }
.feature-card {
  background: var(--bg-card); border:1px solid var(--border); border-radius:var(--radius);
  padding:20px; transition:.2s;
}
.feature-card:hover { border-color:var(--accent); transform:translateY(-2px); box-shadow:0 8px 24px rgba(0,0,0,.3); }
.feature-card .card-icon { font-size:28px; margin-bottom:12px; }
.feature-card h4 { font-size:15px; font-weight:600; margin-bottom:6px; color:var(--text-primary); }
.feature-card p { font-size:13px; color:var(--text-muted); margin:0; line-height:1.5; }

/* ===== Spec Table ===== */
.spec-table { width:100%; border-collapse:collapse; margin:16px 0; }
.spec-table th, .spec-table td { padding:10px 16px; text-align:left; border-bottom:1px solid var(--border); font-size:13.5px; }
.spec-table th { color:var(--text-muted); font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.5px; background:var(--bg-card); }
.spec-table td { color:var(--text-secondary); }
.spec-table td:first-child { color:var(--text-primary); font-weight:500; white-space:nowrap; }

/* ===== UI Reference ===== */
.ui-ref { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); margin:16px 0; overflow:hidden; }
.ui-ref-header { background:var(--bg-secondary); padding:12px 16px; border-bottom:1px solid var(--border); font-size:13px; font-weight:600; color:var(--accent); display:flex; align-items:center; gap:8px; }
.ui-ref-body { padding:16px; }
.ui-ref-body .menu-item { display:flex; align-items:flex-start; gap:12px; padding:10px 0; border-bottom:1px solid var(--border); }
.ui-ref-body .menu-item:last-child { border-bottom:none; }
.menu-item .mi-icon { font-size:18px; flex-shrink:0; width:24px; text-align:center; margin-top:2px; }
.menu-item .mi-content { flex:1; }
.menu-item .mi-name { font-weight:600; font-size:14px; color:var(--text-primary); margin-bottom:2px; }
.menu-item .mi-desc { font-size:12.5px; color:var(--text-muted); line-height:1.5; }

/* ===== Callout ===== */
.callout { border-radius:var(--radius-sm); padding:14px 18px; margin:16px 0; font-size:13.5px; display:flex; gap:12px; align-items:flex-start; }
.callout.tip { background:rgba(16,185,129,0.1); border-left:3px solid var(--green); color:#6ee7b7; }
.callout.warn { background:rgba(251,191,36,0.1); border-left:3px solid #f59e0b; color:#fcd34d; }
.callout.info { background:rgba(59,130,246,0.1); border-left:3px solid var(--blue); color:#93c5fd; }
.callout .callout-icon { font-size:18px; flex-shrink:0; }

/* ===== Badge ===== */
.badge { display:inline-block; padding:2px 8px; border-radius:20px; font-size:11px; font-weight:600; }
.badge-free { background:#374151; color:#9ca3af; }
.badge-business { background:#f97316; color:#fff; }
.badge-enterprise { background:#8b5cf6; color:#fff; }

/* ===== Keyboard Shortcut ===== */
kbd { background:var(--bg-card); border:1px solid var(--border-light); border-radius:4px; padding:2px 6px; font-size:12px; font-family:'Inter',sans-serif; color:var(--text-primary); }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--border-light); }

/* ===== Hero ===== */
.docs-hero { background:linear-gradient(135deg, var(--bg-card) 0%, #1a1040 100%); border:1px solid var(--border); border-radius:var(--radius); padding:48px 40px; margin-bottom:48px; position:relative; overflow:hidden; }
.docs-hero::before { content:''; position:absolute; top:-30%; right:-10%; width:300px; height:300px; background:radial-gradient(circle,rgba(249,115,22,0.15),transparent 70%); }
.docs-hero h1 { font-size:36px; font-weight:800; margin-bottom:12px; background:linear-gradient(135deg,#fff,#f97316); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.docs-hero p { font-size:17px; color:var(--text-secondary); max-width:600px; }

/* ===== Stats Row ===== */
.stats-row { display:flex; gap:24px; margin:24px 0; flex-wrap:wrap; }
.stat-item { text-align:center; }
.stat-value { font-size:28px; font-weight:800; color:var(--accent); }
.stat-label { font-size:12px; color:var(--text-muted); margin-top:2px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .docs-sidebar { display:none; }
  .docs-main { margin-left:0; padding:24px 20px 60px; }
  .feature-grid { grid-template-columns:1fr; }
}
