from __future__ import annotations


def render_dossier_html_document(
    doc_title: str,
    project_name: str,
    contract_number: str,
    signing_date: str,
    client_name: str,
    location: str,
) -> str:
    """Render standardized HTML document for legal/quality inspection record."""
    return f"""<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>{doc_title}</title>
    <style>
        body {{
            font-family: "Times New Roman", Times, serif;
            font-size: 14pt;
            line-height: 1.5;
            margin: 1in;
            color: #000000;
        }}
        .header {{
            text-align: center;
            font-weight: bold;
            margin-bottom: 20px;
        }}
        .title {{
            text-align: center;
            font-size: 16pt;
            font-weight: bold;
            margin-top: 30px;
            margin-bottom: 30px;
            text-transform: uppercase;
        }}
        .section {{
            margin-top: 15px;
            margin-bottom: 10px;
        }}
        .section-title {{
            font-weight: bold;
        }}
        .table-signatures {{
            width: 100%;
            margin-top: 50px;
            border-collapse: collapse;
        }}
        .table-signatures td {{
            text-align: center;
            vertical-align: top;
            width: 50%;
        }}
    </style>
</head>
<body>
    <div class="header">
        CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM<br>
        <u>Độc lập - Tự do - Hạnh phúc</u>
    </div>
    <div class="title">{doc_title}</div>
    <div class="section">
        <p><strong>1. Tên công trình / Dự án:</strong> {project_name}</p>
        <p><strong>2. Căn cứ Hợp đồng số:</strong> {contract_number} ký ngày {signing_date}</p>
        <p><strong>3. Địa điểm xây dựng:</strong> {location}</p>
    </div>
    <div class="section">
        <p class="section-title">4. Thành phần tham gia nghiệm thu:</p>
        <p><strong>a) Đại diện Chủ đầu tư / Ban QLDA:</strong> {client_name}</p>
        <p>- Ông/Bà: ................................. - Chức vụ: Giám đốc Ban QLDA</p>
        <p><strong>b) Đại diện Nhà thầu thi công xây dựng:</strong> CÔNG TY TNHH XÂY DỰNG ĐỊNH SƠN</p>
        <p>- Ông: Nguyễn Sĩ Sơn - Chức vụ: Chỉ huy trưởng công trường</p>
        <p>- Ông: Phạm Văn Tùng - Chức vụ: Cán bộ Kỹ thuật KCS</p>
    </div>
    <div class="section">
        <p class="section-title">5. Đánh giá công việc xây dựng:</p>
        <p>- Về quy cách, kích thước hình học và cao độ: Đạt yêu cầu theo hồ sơ thiết kế bản vẽ thi công được duyệt.</p>
        <p>- Về chất lượng vật liệu, cấu kiện: Có đầy đủ phiếu kiểm tra chất lượng, chứng chỉ xuất xưởng và kết quả thí nghiệm hợp chuẩn.</p>
        <p>- Về an toàn lao động và vệ sinh môi trường: Tuân thủ nghiêm ngặt theo biện pháp thi công đã phê duyệt.</p>
    </div>
    <div class="section">
        <p class="section-title">6. Kết luận:</p>
        <p>Chấp thuận nghiệm thu công việc xây dựng và đồng ý cho phép triển khai các công việc tiếp theo.</p>
    </div>
    <table class="table-signatures">
        <tr>
            <td><strong>ĐẠI DIỆN CHỦ ĐẦU TƯ</strong><br><i>(Ký, ghi rõ họ tên và đóng dấu)</i></td>
            <td><strong>ĐẠI DIỆN NHÀ THẦU THI CÔNG</strong><br><i>(Ký, ghi rõ họ tên và đóng dấu)</i></td>
        </tr>
    </table>
</body>
</html>"""
