/* 日隼空調工程報價系統 — 操作手冊專用現代樣式 */
:root {
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-sidebar: #0f172a;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;
  
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --primary-border: #bae6fd;
  
  --accent: #059669;
  --accent-light: #d1fae5;
  --warning: #d97706;
  --warning-light: #fef3c7;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  --sidebar-width: 280px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* 佈局容器 */
.docs-layout {
  display: flex;
  min-height: 100vh;
}

/* 左側側邊欄導航 */
.docs-sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  color: var(--text-light);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #1e293b;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid #1e293b;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #ffffff;
}

.brand-badge svg {
  color: #38bdf8;
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.brand-text span {
  font-size: 12px;
  color: #94a3b8;
  display: block;
}

.sidebar-nav {
  padding: 20px 12px;
  flex: 1;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 12px 12px 6px;
  font-weight: 600;
}

.nav-menu {
  list-style: none;
  margin-bottom: 16px;
}

.nav-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.nav-menu li a:hover {
  background-color: #1e293b;
  color: #ffffff;
}

.nav-menu li a.active {
  background-color: #0284c7;
  color: #ffffff;
  font-weight: 600;
}

.nav-menu li a svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid #1e293b;
  font-size: 12px;
  color: #64748b;
}

.btn-portal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  background-color: #1e293b;
  color: #38bdf8;
  border: 1px solid #334155;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.btn-portal:hover {
  background-color: #334155;
  color: #ffffff;
}

/* 主內容區域 */
.docs-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  background-color: var(--bg-body);
}

.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.topbar-breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.topbar-breadcrumbs a:hover {
  color: var(--primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.version-tag {
  background-color: #f1f5f9;
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.docs-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 40px 100px;
}

/* 文章內容排版 */
.docs-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.docs-header h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: 12px;
}

.docs-lead {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.6;
}

.section-block {
  margin-bottom: 56px;
  scroll-margin-top: 80px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
}

.section-title svg {
  color: var(--primary);
}

.subsection-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin: 28px 0 12px;
}

p {
  margin-bottom: 16px;
}

/* 提示警示框 (Callout Alerts) */
.callout {
  padding: 16px 20px;
  border-radius: 8px;
  margin: 20px 0;
  border-left: 4px solid transparent;
  display: flex;
  gap: 14px;
  font-size: 14.5px;
}

.callout-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-content {
  flex: 1;
}

.callout-info {
  background-color: var(--primary-light);
  border-left-color: var(--primary);
  color: #0369a1;
}

.callout-success {
  background-color: var(--accent-light);
  border-left-color: var(--accent);
  color: #047857;
}

.callout-warning {
  background-color: var(--warning-light);
  border-left-color: var(--warning);
  color: #b45309;
}

/* 截圖卡片 */
.screenshot-frame {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin: 24px 0 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.screenshot-frame:hover {
  box-shadow: var(--shadow-lg);
}

.screenshot-header {
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #cbd5e1;
}

.window-title {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.screenshot-img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
}

.screenshot-caption {
  padding: 12px 18px;
  background-color: #ffffff;
  font-size: 13.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.screenshot-caption strong {
  color: var(--text-main);
}

/* 步驟數字列表 */
.step-list {
  list-style: none;
  counter-reset: step-counter;
  margin: 20px 0;
}

.step-item {
  position: relative;
  padding-left: 48px;
  margin-bottom: 24px;
}

.step-item::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}

.step-desc {
  font-size: 14.5px;
  color: var(--text-muted);
}

/* 功能特色網格 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.feature-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.feature-card-icon {
  width: 38px;
  height: 38px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.feature-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* 表格樣式 */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.docs-table th, .docs-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.docs-table th {
  background-color: #f8fafc;
  font-weight: 600;
  color: #334155;
}

.docs-table tr:last-child td {
  border-bottom: none;
}

/* FAQ 摺疊區塊 */
details.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

details.faq-item summary {
  padding: 14px 18px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  user-select: none;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

details.faq-item summary:hover {
  background: #f8fafc;
}

details.faq-item .faq-body {
  padding: 14px 18px;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 14px;
}

/* 響應式微調 */
@media (max-width: 900px) {
  .docs-sidebar {
    display: none;
  }
  .docs-main {
    margin-left: 0;
  }
  .docs-content {
    padding: 24px 20px 60px;
  }
  .docs-topbar {
    padding: 12px 20px;
  }
}
