/* Router Security Configuration Design Guide - Shared Styles */
/* Solution Mall Knowledge Center Format */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  color: #212529;
  background: #fff;
  line-height: 1.6;
}

/* ===== LEFT SIDEBAR ===== */
#sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 280px;
  height: 100vh;
  background: #fff;
  border-right: 1px solid #DEE2E6;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
}

.logo-area {
  padding: 16px;
  background: #F8F9FA;
  border-bottom: 1px solid #DEE2E6;
  flex-shrink: 0;
  text-align: center;
}

.logo-img {
  max-width: 180px;
  height: auto;
  display: block;
  margin: 0 auto 8px;
}

.logo-url a {
  font-size: 0.8rem;
  color: #0D6EFD;
  text-decoration: none;
}
.logo-url a:hover { text-decoration: underline; }

.nav-menu {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-item {
  display: flex;
  align-items: center;
  height: 80px;
  width: 100%;
  padding: 12px 16px;
  text-decoration: none;
  color: #212529;
  position: relative;
  border-left: 4px solid transparent;
  transition: background 0.15s;
}

.nav-item:hover {
  background: #F8F9FA;
  cursor: pointer;
}

.nav-item.active {
  background: #F8F9FA;
  border-left-color: #0D6EFD;
}

.nav-active-bar { display: none; }

.nav-icon {
  flex-shrink: 0;
  margin-right: 16px;
  display: flex;
  align-items: center;
}

.nav-label {
  font-size: 0.9rem;
  line-height: 1.3;
  color: #212529;
}

/* ===== RIGHT CONTENT AREA ===== */
#main-content {
  margin-left: 280px;
  min-height: 100vh;
  background: #fff;
  padding: 40px 50px;
}

.content-wrapper {
  max-width: 1000px;
  margin: 0 auto;
}

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(135deg, #0D6EFD 0%, #5DADE2 100%);
  border-radius: 16px;
  padding: 60px 50px;
  margin-bottom: 40px;
  max-width: 1000px;
}

.hero-version {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 12px;
  display: inline-block;
  background: rgba(255,255,255,0.15);
  padding: 4px 12px;
  border-radius: 20px;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 700px;
}

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.btn-primary {
  background: #fff;
  color: #0D6EFD;
  border: none;
  padding: 10px 28px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.7);
  padding: 10px 28px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.15); }

/* ===== TYPOGRAPHY ===== */
h1 { font-size: 2.5rem; font-weight: 700; color: #0D6EFD; margin-bottom: 8px; }
h2 { font-size: 2rem; font-weight: 700; color: #0D6EFD; margin: 40px 0 16px; }
h3 { font-size: 1.5rem; font-weight: 600; color: #0D6EFD; margin: 32px 0 12px; }
h4 { font-size: 1.25rem; font-weight: 600; color: #0D6EFD; margin: 24px 0 10px; }

p { margin-bottom: 1.5rem; color: #212529; line-height: 1.6; }

.page-subtitle { font-size: 0.875rem; color: #6C757D; margin-bottom: 16px; }
.section-divider { border: none; border-top: 1px solid #DEE2E6; margin: 32px 0; }

/* ===== CHAPTER NAV CARDS ===== */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0;
}

.chapter-card {
  background: #0D6EFD;
  border-radius: 8px;
  padding: 20px;
  height: 130px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}
.chapter-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(13,110,253,0.3); }

.chapter-card-icon { color: #fff; flex-shrink: 0; }
.chapter-card-title { color: #fff; font-size: 0.95rem; font-weight: 600; line-height: 1.3; }

.chapter-badge {
  position: absolute;
  top: -8px; right: -8px;
  background: #198754;
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
}

/* ===== IMAGES ===== */
.figure-container {
  margin: 24px 0;
  border: 1px solid #DEE2E6;
  border-radius: 8px;
  overflow: hidden;
  background: #F8F9FA;
}

.figure-container img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3/2;
  object-fit: cover;
}

.figure-caption {
  padding: 10px 16px;
  font-size: 0.875rem;
  color: #6C757D;
  text-align: center;
  background: #F8F9FA;
  border-top: 1px solid #DEE2E6;
}

/* ===== TABLES ===== */
.table-container {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 8px;
  border: 1px solid #DEE2E6;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

thead th {
  background: #F8F9FA;
  color: #212529;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #DEE2E6;
}

tbody td {
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #212529;
  border-bottom: 1px solid #DEE2E6;
  line-height: 1.5;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: #F8F9FA; }

/* ===== CARDS ===== */
.info-card {
  background: #fff;
  border: 1px solid #DEE2E6;
  border-radius: 8px;
  padding: 24px;
  margin: 16px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.075);
  transition: box-shadow 0.15s;
}
.info-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); }

/* ===== LISTS ===== */
ul.bullet-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
ul.bullet-list li {
  padding: 6px 0 6px 20px;
  position: relative;
  line-height: 1.6;
  color: #212529;
}
ul.bullet-list li::before {
  content: '•';
  color: #0D6EFD;
  position: absolute;
  left: 0;
  font-weight: bold;
}

ol.numbered-list {
  padding-left: 24px;
  margin: 16px 0;
}
ol.numbered-list li {
  padding: 6px 0;
  line-height: 1.6;
  color: #212529;
}

/* ===== SECTION HEADER ===== */
.page-header {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid #DEE2E6;
}

/* ===== HIGHLIGHT BOX ===== */
.highlight-box {
  background: #E7F1FF;
  border-left: 4px solid #0D6EFD;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 20px 0;
}

.highlight-box p { margin-bottom: 0; color: #212529; }

/* ===== SCENARIO CARDS ===== */
.scenario-card {
  background: #fff;
  border: 1px solid #DEE2E6;
  border-radius: 8px;
  overflow: hidden;
  margin: 32px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.scenario-card-header {
  background: linear-gradient(90deg, #0D6EFD, #5DADE2);
  color: #fff;
  padding: 16px 24px;
}

.scenario-card-header h4 { color: #fff; margin: 0; font-size: 1.1rem; }
.scenario-card-body { padding: 24px; }

/* ===== METRICS GRID ===== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.metric-item {
  background: #F8F9FA;
  border-radius: 8px;
  padding: 16px;
  border-left: 3px solid #0D6EFD;
}

.metric-label { font-size: 0.8rem; color: #6C757D; margin-bottom: 4px; }
.metric-value { font-size: 1.1rem; font-weight: 700; color: #0D6EFD; }

/* ===== CALCULATOR ===== */
.calc-container {
  background: #fff;
  border: 1px solid #DEE2E6;
  border-radius: 12px;
  padding: 32px;
  margin: 32px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.calc-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0D6EFD;
  margin-bottom: 8px;
}

.calc-desc {
  font-size: 0.9rem;
  color: #6C757D;
  margin-bottom: 24px;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.calc-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 6px;
}

.calc-field input, .calc-field select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #DEE2E6;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #212529;
  background: #fff;
  transition: border-color 0.15s;
}

.calc-field input:focus, .calc-field select:focus {
  outline: none;
  border-color: #0D6EFD;
  box-shadow: 0 0 0 3px rgba(13,110,253,0.1);
}

.calc-btn {
  background: #0D6EFD;
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.calc-btn:hover { background: #0b5ed7; transform: translateY(-1px); }

.calc-results {
  background: linear-gradient(135deg, #0D6EFD 0%, #5DADE2 100%);
  border-radius: 8px;
  padding: 24px;
  margin-top: 20px;
  display: none;
}

.calc-results.visible { display: block; }

.calc-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.calc-result-item {
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.calc-result-label { font-size: 0.8rem; color: rgba(255,255,255,0.85); margin-bottom: 6px; }
.calc-result-value { font-size: 1.4rem; font-weight: 700; color: #fff; }
.calc-result-unit { font-size: 0.75rem; color: rgba(255,255,255,0.7); }

/* ===== RANGE SLIDER ===== */
input[type="range"] {
  width: 100%;
  accent-color: #0D6EFD;
}

/* ===== BADGE ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-blue { background: #E7F1FF; color: #0D6EFD; }
.badge-green { background: #D1FAE5; color: #198754; }
.badge-red { background: #FEE2E2; color: #DC3545; }
.badge-orange { background: #FEF3C7; color: #D97706; }

/* ===== SECTION INTRO ===== */
.section-intro {
  background: #F8F9FA;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 32px;
  border-left: 4px solid #0D6EFD;
}
