/* ========================================
   Skilley 事業計画書 - 共通スタイル
   銀行融資用プロフェッショナルデザイン
======================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Noto+Serif+JP:wght@400;700&display=swap');

:root {
  /* カラーパレット - 信頼感のあるネイビー系 */
  --primary: #1a365d;
  --primary-light: #2c5282;
  --primary-dark: #0d1b2a;
  --accent: #c9a227;
  --accent-light: #d4af37;
  --success: #276749;
  --warning: #c05621;
  --danger: #c53030;
  
  /* 背景色 */
  --bg-main: #f7fafc;
  --bg-white: #ffffff;
  --bg-light: #edf2f7;
  --bg-dark: #1a202c;
  
  /* テキスト */
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --text-light: #a0aec0;
  
  /* ボーダー */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e0;
  
  /* シャドウ */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  
  /* フォント */
  --font-sans: 'Noto Sans JP', sans-serif;
  --font-serif: 'Noto Serif JP', serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-primary);
  background: var(--bg-main);
}

/* ========================================
   ヘッダー
======================================== */
.header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 0.5rem;
}

.nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.nav a:hover,
.nav a.active {
  background: rgba(255,255,255,0.1);
  color: white;
}

/* ========================================
   メインコンテンツ
======================================== */
.main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.page-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--accent);
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* ========================================
   セクション
======================================== */
.section {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 4px solid var(--accent);
}

.section-content {
  color: var(--text-secondary);
}

.section-content p {
  margin-bottom: 1rem;
}

.section-content p:last-child {
  margin-bottom: 0;
}

/* ========================================
   テーブル
======================================== */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: var(--primary);
  color: white;
}

th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
}

th.text-right,
td.text-right {
  text-align: right;
}

th.text-center,
td.text-center {
  text-align: center;
}

tbody tr {
  border-bottom: 1px solid var(--border-light);
}

tbody tr:hover {
  background: var(--bg-light);
}

td {
  padding: 0.875rem 1rem;
}

/* テーブルの数値ハイライト */
.positive {
  color: var(--success);
  font-weight: 500;
}

.negative {
  color: var(--danger);
  font-weight: 500;
}

.highlight-row {
  background: #fefce8 !important;
}

/* ========================================
   カード
======================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.card-title {
  font-weight: 700;
  color: var(--primary);
}

.card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.card-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ========================================
   ステップ・タイムライン
======================================== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-medium);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.25rem;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg-white);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-date {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.timeline-title {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.timeline-content {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ========================================
   リスト
======================================== */
.list {
  list-style: none;
}

.list li {
  padding: 0.75rem 0;
  padding-left: 1.5rem;
  position: relative;
  border-bottom: 1px solid var(--border-light);
}

.list li:last-child {
  border-bottom: none;
}

.list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* ========================================
   強調・バッジ
======================================== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}

.badge-primary {
  background: var(--primary);
  color: white;
}

.badge-success {
  background: #c6f6d5;
  color: var(--success);
}

.badge-warning {
  background: #feebc8;
  color: var(--warning);
}

.badge-danger {
  background: #fed7d7;
  color: var(--danger);
}

.highlight {
  background: linear-gradient(transparent 60%, #fef08a 60%);
  font-weight: 500;
}

.text-large {
  font-size: 1.25rem;
}

.text-bold {
  font-weight: 700;
}

.text-primary {
  color: var(--primary);
}

.text-accent {
  color: var(--accent);
}

/* ========================================
   ボックス
======================================== */
.box {
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.box-info {
  background: #ebf8ff;
  border-left: 4px solid #3182ce;
}

.box-success {
  background: #f0fff4;
  border-left: 4px solid var(--success);
}

.box-warning {
  background: #fffaf0;
  border-left: 4px solid var(--warning);
}

.box-accent {
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
  border: 2px solid var(--accent);
}

.box-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* ========================================
   ナビゲーション（ページ内）
======================================== */
.page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.page-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--bg-light);
  color: var(--primary);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

.page-nav a:hover {
  background: var(--primary);
  color: white;
}

/* ========================================
   フッター
======================================== */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

.footer-company {
  font-size: 1.125rem;
  font-weight: 500;
  color: white;
  margin-bottom: 0.5rem;
}

/* ========================================
   目次ページ専用
======================================== */
.toc-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  margin: -3rem -2rem 3rem -2rem;
  border-radius: 0 0 2rem 2rem;
}

.toc-hero h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.toc-hero p {
  font-size: 1.125rem;
  opacity: 0.9;
}

.toc-meta {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  display: flex;
  justify-content: center;
  gap: 3rem;
  font-size: 0.9rem;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
}

.toc-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.toc-number {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.toc-text h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.toc-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========================================
   グラフ風表示
======================================== */
.bar-chart {
  margin: 1.5rem 0;
}

.bar-item {
  margin-bottom: 1rem;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.bar-track {
  height: 24px;
  background: var(--bg-light);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.bar-fill.accent {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
}

/* ========================================
   デモ画面用
======================================== */
.demo-container {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 2rem;
  margin: 1.5rem 0;
}

.demo-phone {
  max-width: 375px;
  margin: 0 auto;
  background: white;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 8px solid #1f2937;
}

.demo-screen {
  min-height: 600px;
}

/* ========================================
   印刷用スタイル
======================================== */
@media print {
  .header,
  .page-nav,
  .nav {
    display: none;
  }
  
  body {
    background: white;
  }
  
  .main {
    max-width: 100%;
    padding: 0;
  }
  
  .section {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}

/* ========================================
   レスポンシブ
======================================== */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .toc-hero h1 {
    font-size: 1.75rem;
  }
  
  .toc-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .page-nav {
    flex-direction: column;
    gap: 1rem;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
}
