/* ===== MANUAL STYLES ===== */

.manual {
  padding-top: 70px;
}

/* Hero */
.manual-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 50%, #0a3d62 100%);
  color: var(--white);
  text-align: center;
  padding: 4rem 2rem 3rem;
}

.manual-hero.technical {
  background: linear-gradient(135deg, #1b5e20 0%, #0d47a1 100%);
}

.manual-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.manual-hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 1rem;
}

.manual-meta {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  flex-wrap: wrap;
}

/* Body */
.manual-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Sections */
.manual-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.manual-section:last-child {
  border-bottom: none;
}

.manual-section h2 {
  font-size: 1.6rem;
  color: var(--dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

.manual-section h3 {
  font-size: 1.15rem;
  color: var(--dark);
  margin: 1.5rem 0 0.8rem;
}

.manual-section h4 {
  font-size: 1rem;
  color: var(--dark);
  margin-bottom: 0.3rem;
}

.manual-section p {
  margin-bottom: 0.8rem;
  line-height: 1.7;
}

.manual-section ul, .manual-section ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.manual-section li {
  margin-bottom: 0.4rem;
  line-height: 1.6;
  list-style: disc;
}

.manual-section ol li {
  list-style: decimal;
}

/* TOC */
.toc {
  columns: 2;
  column-gap: 2rem;
}

.toc li {
  list-style: decimal !important;
  margin-bottom: 0.5rem;
}

.toc a {
  color: var(--primary);
  font-weight: 500;
  transition: color 0.2s;
}

.toc a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

@media (max-width: 600px) {
  .toc { columns: 1; }
}

/* Tables */
.manual-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}

.manual-table th, .manual-table td {
  border: 1px solid #ddd;
  padding: 0.65rem 0.8rem;
  text-align: left;
}

.manual-table th {
  background: var(--dark);
  color: var(--white);
  font-weight: 600;
}

.manual-table tr:nth-child(even) {
  background: #f8f9fa;
}

.manual-table tr:hover {
  background: #e8f5e9;
}

.manual-table code {
  background: #e3f2fd;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #0d47a1;
}

/* Formula box */
.formula-box {
  display: inline-block;
  background: #e8f5e9;
  color: #2e7d32;
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Tips & Warnings */
.manual-tip {
  background: #e3f2fd;
  border-left: 4px solid var(--primary);
  padding: 1rem 1.2rem;
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.manual-warning {
  background: #fff3e0;
  border-left: 4px solid #ff9800;
  padding: 1rem 1.2rem;
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
  font-size: 0.95rem;
}

/* Examples */
.manual-example {
  background: #f1f8e9;
  border: 1px solid #c5e1a5;
  border-radius: 8px;
  padding: 1.2rem;
  margin: 1rem 0;
}

.manual-example p { margin-bottom: 0.5rem; }

.manual-example ul {
  padding-left: 1.2rem;
  margin-bottom: 0.5rem;
}

/* Steps */
.manual-steps {
  margin: 1rem 0;
}

.manual-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.2rem;
  padding: 1rem;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.step-content h4 { margin-bottom: 0.2rem; }
.step-content p { margin: 0; color: var(--gray); font-size: 0.92rem; }

/* Interface parts */
.interface-parts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.interface-part {
  background: var(--white);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.2rem;
}

.interface-part h4 {
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.interface-part p {
  font-size: 0.9rem;
  color: var(--gray);
  margin: 0;
}

/* Code blocks */
.code-block {
  background: #263238;
  color: #e0e0e0;
  padding: 1.2rem 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 1rem 0;
  white-space: pre;
}

/* FAQ */
.faq-item {
  margin-bottom: 1.5rem;
  padding: 1.2rem;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.faq-item h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.faq-item p {
  margin: 0;
  color: var(--gray);
}

/* Print styles */
@media print {
  .navbar, .footer { display: none; }
  .manual-hero { padding: 2rem; }
  .manual-section { break-inside: avoid; }
  .code-block { background: #f5f5f5; color: #333; border: 1px solid #ddd; }
}
