/* ==========================================================================
   NPRA Unit Penyaringan — Master SOP Document Stylesheet (sop-document.css)
   Complete Unified Styles for all Arahan Kerja 300 & Quality Procedures
   ========================================================================== */

:root {
    --text-heading: #090d16;
    --text-body: #1e293b;
    --text-muted: #475569;
    --card-surface: #ffffff;
    --card-border-subtle: #cbd5e1;
    --step-border: #94a3b8;
  }

[data-theme="dark"] {
    --text-heading: #f8fafc;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --card-surface: rgba(15, 23, 42, 0.85);
    --card-border-subtle: rgba(255, 255, 255, 0.12);
    --step-border: rgba(255, 255, 255, 0.18);
  }

.sop-doc-container {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: 20px; padding: 2.5rem; backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md); margin-top: 1.5rem; position: relative;
  }

/* Header Table */

.sop-header-table {
    width: 100%; border-collapse: collapse; margin-bottom: 2rem; font-family: var(--font-mono); font-size: 0.88rem;
    background: var(--card-surface); border-radius: 12px; overflow: hidden; border: 1px solid var(--card-border-subtle);
    box-shadow: var(--shadow-sm);
  }

.sop-header-table td {
    border: 1px solid var(--card-border-subtle); padding: 0.85rem 1.1rem; vertical-align: middle; color: var(--text-body);
  }

.sop-header-table strong { color: var(--text-heading); font-weight: 700; }

/* Sections */

.sop-section-container {
    background: var(--card-surface);
    border: 1px solid var(--card-border-subtle);
    border-radius: 16px;
    margin-bottom: 2.2rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

.sop-section-container:hover {
    box-shadow: var(--shadow-md);
  }

.sop-section-header {
    padding: 0.95rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    font-weight: 800;
  }

.sop-section-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0;
    color: #ffffff;
  }

.sec-icon {
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

.sec-theme-cyan .sop-section-header { background: linear-gradient(135deg, #0284c7, #0369a1); }

.sec-theme-purple .sop-section-header { background: linear-gradient(135deg, #7c3aed, #6d28d9); }

.sec-theme-mint .sop-section-header { background: linear-gradient(135deg, #059669, #047857); }

.sec-theme-amber .sop-section-header { background: linear-gradient(135deg, #d97706, #b45309); }

.sec-theme-indigo .sop-section-header { background: linear-gradient(135deg, #4f46e5, #3730a3); }

.sec-theme-rose .sop-section-header { background: linear-gradient(135deg, #e11d48, #be123c); }

.sec-theme-slate .sop-section-header { background: linear-gradient(135deg, #475569, #334155); }

.sop-section-body { padding: 1.6rem 1.8rem; }

/* Step Cards */

.sop-step-card {
    background: var(--glass);
    border: 1px solid var(--step-border);
    border-left: 5px solid var(--cyan);
    border-radius: 12px;
    margin-bottom: 1.2rem;
    overflow: hidden;
    transition: all 0.2s ease;
  }

.sop-step-card:hover {
    border-color: var(--cyan);
    border-left-color: var(--purple);
    background: var(--card-hover);
    transform: translateY(-2px);
  }

.sop-step-card.action-step {
    border-left-color: #d97706;
  }

.sop-step-card.action-step:hover {
    border-left-color: #b45309;
  }

.step-card-header {
    padding: 0.85rem 1.2rem;
    background: rgba(2, 132, 199, 0.08);
    border-bottom: 1px solid var(--glass-border);
  }

.action-step .step-card-header {
    background: rgba(217, 119, 6, 0.08);
  }

.step-check-wrap {
    display: flex;
    align-items: center;
    gap: 0.8rem;
  }

.sop-task-check {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--cyan);
    flex-shrink: 0;
  }

.sop-step-title {
    cursor: pointer;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-heading);
    font-family: var(--font-main);
    line-height: 1.6;
  }

.step-card-body { padding: 1.1rem 1.3rem; }

/* Action Step Badge */

.action-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    margin-right: 0.5rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    flex-shrink: 0;
  }

/* Typography */

.sop-p { font-size: 0.95rem; line-height: 1.8; color: var(--text-body); margin-bottom: 0.8rem; }

.sop-list-item {
    display: flex; gap: 0.65rem; align-items: flex-start; margin-left: 0.8rem; font-size: 0.93rem;
    line-height: 1.75; color: var(--text-body); margin-bottom: 0.5rem;
  }

.sop-bullet { color: var(--cyan); font-weight: bold; flex-shrink: 0; }

.sop-list-text { flex: 1; }

/* Revision History Collapsible */

.rev-details {
    background: var(--card-surface);
    border: 1px solid var(--card-border-subtle);
    border-radius: 12px;
    margin-bottom: 1.2rem;
    overflow: hidden;
    transition: all 0.2s ease;
  }

.rev-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.2rem;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(71, 85, 105, 0.06);
    user-select: none;
    list-style: none;
  }

.rev-summary::-webkit-details-marker { display: none; }

.rev-summary:hover { color: var(--text-heading); background: rgba(71, 85, 105, 0.1); }

.rev-toggle-icon { font-size: 1rem; }

.rev-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
    font-size: 0.85rem;
  }

details[open] .rev-arrow { transform: rotate(90deg); }

.rev-body {
    padding: 1rem 1.3rem;
    border-top: 1px solid var(--card-border-subtle);
    max-height: 400px;
    overflow-y: auto;
  }

.sop-rev-p {
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    padding-left: 0.5rem;
    border-left: 2px solid rgba(71, 85, 105, 0.15);
  }

/* Keyword Highlights */

.kw-temp { color: #d97706; font-weight: 700; font-family: var(--font-mono); background: rgba(217, 119, 6, 0.1); padding: 0.1rem 0.35rem; border-radius: 4px; }

.kw-flow { color: #0284c7; font-weight: 700; font-family: var(--font-mono); background: rgba(2, 132, 199, 0.1); padding: 0.1rem 0.35rem; border-radius: 4px; }

.kw-wave { color: #7c3aed; font-weight: 700; font-family: var(--font-mono); background: rgba(124, 58, 237, 0.1); padding: 0.1rem 0.35rem; border-radius: 4px; }

.kw-wt { color: #059669; font-weight: 700; font-family: var(--font-mono); background: rgba(5, 150, 105, 0.1); padding: 0.1rem 0.35rem; border-radius: 4px; }

.kw-vol { color: #0284c7; font-weight: 700; font-family: var(--font-mono); background: rgba(2, 132, 199, 0.1); padding: 0.1rem 0.35rem; border-radius: 4px; }

.kw-time { color: #d97706; font-weight: 700; font-family: var(--font-mono); background: rgba(217, 119, 6, 0.1); padding: 0.1rem 0.35rem; border-radius: 4px; }

.kw-limit { color: #dc2626; font-weight: 700; font-family: var(--font-mono); background: rgba(220, 38, 38, 0.1); padding: 0.1rem 0.35rem; border-radius: 4px; }

.kw-ph { color: #7c3aed; font-weight: 700; font-family: var(--font-mono); background: rgba(124, 58, 237, 0.1); padding: 0.1rem 0.35rem; border-radius: 4px; }

/* Visual Workflow Timeline */

.wf-track {
    display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 1.8rem;
    background: var(--card-surface); padding: 1.2rem 1.4rem; border-radius: 16px; border: 1px solid var(--card-border-subtle); overflow-x: auto;
    box-shadow: var(--shadow-sm);
  }

.wf-step { display: flex; align-items: center; gap: 0.6rem; min-width: 140px; }

.wf-node {
    width: 34px; height: 34px; border-radius: 50%; background: var(--cyan-dim); border: 2px solid var(--cyan);
    color: var(--cyan); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono);
    font-size: 0.9rem; font-weight: 800; flex-shrink: 0;
  }

.wf-name { font-family: var(--font-mono); font-size: 0.84rem; font-weight: 700; color: var(--text-heading); }

.wf-desc { font-size: 0.74rem; color: var(--text-muted); line-height: 1.3; }

.wf-arrow { color: var(--cyan); font-size: 1rem; font-weight: bold; flex-shrink: 0; }

/* Two-Way Cross Link Grid */

.cross-link-container {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.08), rgba(124, 58, 237, 0.08));
    border: 1px solid var(--cyan); border-radius: 16px; padding: 1.3rem 1.5rem; margin-bottom: 1.8rem;
    box-shadow: var(--shadow-sm);
  }

.cross-link-container.analysis-theme {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(2, 132, 199, 0.08));
    border-color: var(--mint);
  }

.cross-header {
    display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; font-weight: 800;
    color: var(--text-heading); margin-bottom: 1rem;
  }

.cross-icon { font-size: 1.15rem; }

.cross-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.8rem;
  }

.inst-link-card, .analysis-link-card {
    background: var(--card-surface); border: 1px solid var(--card-border-subtle); border-radius: 12px;
    padding: 0.9rem 1.1rem; text-decoration: none; display: flex; flex-direction: column; gap: 0.3rem;
    transition: all 0.2s ease; box-shadow: var(--shadow-sm);
  }

.inst-link-card:hover, .analysis-link-card:hover {
    border-color: var(--cyan); transform: translateY(-2px); box-shadow: var(--shadow-md);
  }

.inst-code, .ana-code { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 800; color: var(--cyan); }

.inst-name, .ana-name { font-size: 0.85rem; font-weight: 700; color: var(--text-heading); line-height: 1.35; }

.inst-badge, .ana-badge { font-size: 0.72rem; font-weight: 600; color: var(--purple); margin-top: 0.2rem; }

/* Deep Tips Card */

.deep-tips-card {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(2, 132, 199, 0.08));
    border: 1px solid var(--purple); border-radius: 14px; padding: 1.3rem 1.5rem; margin-bottom: 1.8rem;
    box-shadow: var(--shadow-sm);
  }

/* Parameters Specs Ribbon Card */

.specs-ribbon-card {
    background: var(--card-surface);
    border: 1.5px solid var(--cyan);
    border-radius: 16px;
    padding: 1.3rem 1.5rem;
    margin: 1.5rem 0 1.8rem;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
  }

.specs-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 1rem;
  }

.specs-icon { font-size: 1.2rem; }

.specs-ribbon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.85rem;
  }

.spec-chip {
    background: var(--glass);
    border: 1px solid var(--card-border-subtle);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: all 0.2s ease;
  }

.spec-chip:hover {
    border-color: var(--cyan);
    background: var(--card-surface);
    transform: translateY(-2px);
  }

.spec-chip.highlight-limit {
    border-color: rgba(217, 119, 6, 0.4);
    background: var(--amber-dim);
  }

.spec-lbl {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--cyan);
    letter-spacing: 0.05em;
  }

.highlight-limit .spec-lbl {
    color: #d97706;
  }

.spec-val {
    font-size: 0.85rem;
    color: var(--text-heading);
    line-height: 1.4;
  }

.highlight-amber-text {
    color: #d97706;
    font-weight: 800;
  }

/* Executive Summary & Chips */

.summary-analytes {
    margin: 1rem 0 1.4rem; padding: 1rem 1.3rem; background: var(--card-surface); border-radius: 14px;
    border: 1px solid var(--card-border-subtle); display: flex; flex-direction: column; gap: 0.5rem;
    box-shadow: var(--shadow-sm);
  }

.sum-lbl { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; color: var(--cyan); text-transform: uppercase; }

.chips-container { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.analite-chip {
    padding: 0.35rem 0.75rem; background: var(--purple-dim); border: 1px solid rgba(124, 58, 237, 0.25);
    color: var(--purple); font-family: var(--font-mono); font-size: 0.78rem; border-radius: 8px; font-weight: 600;
  }

/* Bench Notes Card */

.bench-tips-card {
    background: var(--amber-dim); border: 1px solid rgba(217, 119, 6, 0.35); border-radius: 14px;
    padding: 1.3rem 1.5rem; margin-bottom: 1.8rem; box-shadow: var(--shadow-sm);
  }

.tips-header { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; color: #d97706; margin-bottom: 0.7rem; font-weight: 700; }

.tips-list { margin-left: 1.5rem; font-size: 0.9rem; line-height: 1.7; color: var(--text-body); }

/* Progress Tracker */

.progress-card {
    background: linear-gradient(135deg, var(--cyan-dim), var(--purple-dim));
    border: 1px solid var(--cyan); border-radius: 14px; padding: 1.1rem 1.5rem;
    margin-bottom: 1.8rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
    box-shadow: var(--shadow-sm);
  }

.progress-left { display: flex; flex-direction: column; gap: 0.35rem; }

.progress-title { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; color: var(--cyan); }

.progress-bar-bg { width: 280px; max-width: 100%; height: 10px; background: rgba(0,0,0,0.1); border-radius: 100px; overflow: hidden; }

.progress-bar-fill { height: 100%; background: var(--cyan); width: 0%; transition: width 0.3s ease; }

.progress-stat { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 700; color: var(--text-heading); }

/* TOC Pills */

.toc-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem; }

.toc-pill {
    padding: 0.45rem 0.9rem; background: var(--card-surface); border: 1px solid var(--card-border-subtle);
    border-radius: 100px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-body);
    text-decoration: none; transition: all 0.2s ease; box-shadow: var(--shadow-sm); font-weight: 600;
  }

.toc-pill:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-1px); }

.toc-pill.highlight { background: var(--cyan-dim); border-color: var(--cyan); color: var(--cyan); font-weight: 700; }

.toc-pill.highlight-amber { background: var(--amber-dim); border-color: #d97706; color: #d97706; font-weight: 700; }

/* Table Cards */

.table-card {
    background: var(--card-surface); border: 1px solid var(--card-border-subtle); border-radius: 14px;
    padding: 1.4rem; margin: 1.8rem 0; overflow: hidden; box-shadow: var(--shadow-sm);
  }

.table-card-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.9rem;
    border-bottom: 2px solid var(--glass-border); padding-bottom: 0.5rem;
  }

.table-tag { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 800; color: var(--cyan); }

.table-doc-code { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

.table-responsive { overflow-x: auto; }

.table-official {
    width: 100%; border-collapse: collapse; font-size: 0.85rem; font-family: var(--font-mono);
  }

.table-official th, .table-official td {
    border: 1px solid var(--card-border-subtle); padding: 0.65rem 0.9rem; text-align: left;
  }

.table-official th { background: var(--glass); color: var(--text-heading); font-weight: 700; }

.seq-sst { background: var(--purple-dim); }

.seq-iqc { background: var(--cyan-dim); }

.seq-blank { background: rgba(0,0,0,0.03); color: var(--text-muted); }

@media print {
    .topbar, .ctrl-btn, .bg-canvas, .grid-overlay, .progress-card, .toc-pills, .bench-tips-card, .wf-track, .cross-link-container, .deep-tips-card, .rev-details { display: none !important; }
    .main { max-width: 100% !important; padding: 0 !important; }
    .sop-doc-container { box-shadow: none !important; border: none !important; padding: 0 !important; }
    body { background: #fff !important; color: #000 !important; }
    .sop-section-header { background: #eee !important; color: #000 !important; }
    .sop-section-header h2 { color: #000 !important; }
    .sop-step-card { border-left: 2px solid #000 !important; background: none !important; }
  }

@media (max-width: 768px) {
    .sop-doc-container { padding: 1.2rem; }
    .sop-section-body { padding: 1rem; }
    .wf-track { flex-wrap: wrap; justify-content: center; }
    .cross-grid { grid-template-columns: 1fr; }
  }

/* Subsections & Distinct Headers */

.sop-subsection {
    margin-top: 1.8rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--sub-border);
  }

.sop-subsection-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.01em;
    margin: 0 0 0.5rem 0;
  }

.sop-subsection-badge {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    letter-spacing: 0.03em;
  }

.sop-group-title {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cyan);
    margin: 1.3rem 0 0.6rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

/* Screenshot Figure Callout Card */

.sop-fig-callout {
    background: var(--sub-bg);
    border: 1px solid var(--sub-border);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin: 1rem 0 1.2rem;
    text-align: center;
  }

.sop-fig-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--card-border-subtle);
    box-shadow: var(--shadow-sm);
    background: #ffffff;
    padding: 4px;
    transition: transform 0.2s ease;
  }

.sop-fig-img:hover {
    transform: scale(1.01);
  }

.sop-fig-caption {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
  }

/* Info / Alert Cards */

.criteria-card {
    background: rgba(5, 150, 105, 0.06);
    border: 1.5px solid var(--mint);
    border-radius: 12px;
    padding: 1.2rem 1.4rem;
    margin: 1.2rem 0;
  }

.criteria-card.amber-theme {
    background: var(--amber-dim);
    border-color: #d97706;
  }

.criteria-card.cyan-theme {
    background: var(--cyan-dim);
    border-color: var(--cyan);
  }

.criteria-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 0.75rem;
  }

/* Definition Cards Grid */

.def-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.8rem;
    margin: 1rem 0;
  }

.def-card {
    background: var(--card-surface);
    border: 1px solid var(--card-border-subtle);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }

.def-term {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--purple);
  }

.def-desc {
    font-size: 0.88rem;
    color: var(--text-heading);
    font-weight: 500;
  }

/* Responsibility Roles Grid */

.resp-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
  }

.resp-card {
    background: var(--card-surface);
    border: 1px solid var(--card-border-subtle);
    border-left: 4px solid var(--mint);
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
  }

.resp-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

.kw-key { color: #7c3aed; font-weight: 700; font-family: var(--font-mono); background: rgba(124, 58, 237, 0.1); padding: 0.1rem 0.35rem; border-radius: 4px; }

.inst-link-card {
    background: var(--card-surface); border: 1px solid var(--card-border-subtle); border-radius: 12px;
    padding: 0.9rem 1.1rem; text-decoration: none; display: flex; flex-direction: column; gap: 0.3rem;
    transition: all 0.2s ease; box-shadow: var(--shadow-sm);
  }

.inst-link-card:hover {
    border-color: var(--cyan); transform: translateY(-2px); box-shadow: var(--shadow-md);
  }

.inst-code { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 800; color: var(--cyan); }

.inst-name { font-size: 0.85rem; font-weight: 700; color: var(--text-heading); line-height: 1.35; }

.inst-badge { font-size: 0.72rem; font-weight: 600; color: var(--purple); margin-top: 0.2rem; }

/* Inline Table Cards */

/* Gallery Grid */

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

.figure-card {
    background: var(--card-surface);
    border: 1px solid var(--card-border-subtle);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

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

.figure-img-wrap {
    background: #ffffff;
    padding: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--card-border-subtle);
  }

.figure-img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
  }

.figure-caption {
    padding: 0.8rem 1rem;
    background: var(--card-surface);
  }

.fig-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 0.25rem;
  }

.fig-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.35;
  }

/* Material & Reagent Grid Cards */

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1rem 0 1.5rem;
  }

.material-card {
    background: var(--sub-bg);
    border: 1px solid var(--sub-border);
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
  }

.mat-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--card-border-subtle);
  }

.mat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
  }

.mat-list li {
    font-size: 0.88rem;
    color: var(--text-body);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
  }

.mat-bullet {
    color: var(--cyan);
    font-weight: bold;
    flex-shrink: 0;
  }

/* Inline Figure Callout Card */

.sop-fig-subdesc {
    font-family: var(--font-main);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
  }

/* Target Analytes Summary */

/* Section 8.0 Lampiran Figures Gallery */

.lampiran-box {
    background: var(--card-surface);
    border: 1px solid var(--card-border-subtle);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
  }

.lampiran-header {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--cyan);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

.figures-grid-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
  }

/* Lampiran & Figure Cards */

.figure-card:hover .figure-img {
    transform: scale(1.02);
  }

.figures-grid-3col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
  }

.sec-theme-teal .sop-section-header { background: linear-gradient(135deg, #0d9488, #0f766e); }

/* Sub-step cards */

.sub-step-card {
    background: var(--sub-bg);
    border: 1px solid var(--sub-border);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin: 0.8rem 0 0.8rem 1.5rem;
  }

.sub-step-title {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

/* Diagnostic / Callout Boxes */

.diag-box {
    background: var(--card-surface);
    border: 1px solid var(--card-border-subtle);
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
    margin: 1rem 0;
    box-shadow: var(--shadow-sm);
  }

.diag-box-title {
    font-family: var(--font-mono); font-size: 0.85rem; font-weight: 800; color: var(--cyan);
    margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.4rem;
  }

/* Safety & Tip boxes */

.safety-box {
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-left: 4px solid var(--red);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin: 1rem 0;
  }

.safety-box-title {
    font-family: var(--font-mono); font-size: 0.82rem; font-weight: 800; color: var(--red);
    margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.4rem;
  }

.tip-box {
    background: rgba(5, 150, 105, 0.06);
    border: 1px solid rgba(5, 150, 105, 0.25);
    border-left: 4px solid var(--mint);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin: 1rem 0;
  }

.tip-box-title {
    font-family: var(--font-mono); font-size: 0.82rem; font-weight: 800; color: var(--mint);
    margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.4rem;
  }

.table-official tbody tr:nth-child(even) { background: var(--sub-bg); }

.pass-badge { background: rgba(5, 150, 105, 0.15); color: #059669; padding: 0.2rem 0.5rem; border-radius: 6px; font-weight: 700; }

.fail-badge { background: rgba(220, 38, 38, 0.12); color: #dc2626; padding: 0.2rem 0.5rem; border-radius: 6px; font-weight: 700; }

/* Formula / Equation Card */

.formula-card {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.08), rgba(124, 58, 237, 0.08));
    border: 1.5px solid var(--cyan);
    border-radius: 14px;
    padding: 1.4rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
  }

.formula-title {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--cyan);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

.formula-box {
    background: var(--card-surface);
    border: 1px solid var(--card-border-subtle);
    border-radius: 10px;
    padding: 1.2rem;
    font-family: var(--font-mono);
    font-size: 0.92rem;
    text-align: center;
    color: var(--text-heading);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    overflow-x: auto;
  }

.formula-desc {
    margin-top: 1rem;
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--text-body);
  }

/* Interactive Calculator Card */

.calc-card {
    background: var(--card-surface);
    border: 1px solid var(--card-border-subtle);
    border-radius: 14px;
    padding: 1.4rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
  }

.calc-header {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--purple);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.2rem;
  }

.calc-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

.calc-group label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-heading);
  }

.calc-input {
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--card-border-subtle);
    border-radius: 8px;
    background: var(--sub-bg);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--text-heading);
  }

.calc-input:focus {
    outline: none;
    border-color: var(--cyan);
  }

.calc-res-box {
    background: var(--sub-bg);
    border: 1px solid var(--sub-border);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--cyan);
  }

/* Ordered list inside step cards */

.proc-list {
    margin-left: 1.5rem;
    line-height: 1.85;
    color: var(--text-body);
    font-size: 0.93rem;
    counter-reset: proc-counter;
    list-style: none;
    padding-left: 0;
  }

.proc-list li {
    counter-increment: proc-counter;
    position: relative;
    padding-left: 2.2rem;
    margin-bottom: 0.65rem;
  }

.proc-list li::before {
    content: counter(proc-counter);
    position: absolute;
    left: 0;
    top: 0.15rem;
    width: 1.6rem;
    height: 1.6rem;
    background: var(--cyan-dim);
    color: var(--cyan);
    border-radius: 50%;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
  }

.proc-list li strong { color: var(--text-heading); }

.proc-list li code {
    font-family: var(--font-mono);
    background: var(--cyan-dim);
    color: var(--cyan);
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
    font-size: 0.82rem;
    font-weight: 600;
  }

.analysis-link-card {
    background: var(--card-surface); border: 1px solid var(--card-border-subtle); border-radius: 12px;
    padding: 0.9rem 1.1rem; text-decoration: none; display: flex; flex-direction: column; gap: 0.3rem;
    transition: all 0.2s ease; box-shadow: var(--shadow-sm);
  }

.analysis-link-card:hover {
    border-color: var(--mint); transform: translateY(-2px); box-shadow: var(--shadow-md);
  }

.ana-code { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 800; color: var(--mint); }

.ana-name { font-size: 0.85rem; font-weight: 700; color: var(--text-heading); line-height: 1.35; }

.ana-badge { font-size: 0.72rem; font-weight: 600; color: var(--purple); margin-top: 0.2rem; }

/* Definition grid */

.def-abbr {
    font-family: var(--font-mono);
    font-weight: 800;
    color: var(--cyan);
  }

.def-full {
    color: var(--text-body);
  }

/* Warning / Safety boxes */

/* Figure Callout Cards */

.fig-callout {
    background: var(--card-surface);
    border: 1px solid var(--card-border-subtle);
    border-radius: 14px;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    cursor: pointer;
  }

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

.fig-callout img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
  }

.fig-callout:hover img {
    transform: scale(1.02);
  }

.fig-callout.zoomed img {
    transform: scale(1.5);
    cursor: zoom-out;
  }

.fig-caption {
    padding: 0.9rem 1.2rem;
    border-top: 1px solid var(--card-border-subtle);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }

.fig-subdesc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
  }

.fig-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--purple);
    font-weight: 600;
    margin-top: 0.3rem;
  }

/* Revision history table striped */

/* Keyboard shortcut styling */

kbd {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    background: var(--glass);
    border: 1px solid var(--card-border-subtle);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-weight: 600;
    color: var(--text-heading);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  }

  /* Utility: Tips Icon */
  .tips-icon { font-size: 1.1rem; line-height: 1; }

  /* Utility: Figure Description */
  .figure-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

  /* Utility: Workflow Info */
  .wf-info { display: flex; flex-direction: column; }
