﻿
        :root {
            --primary: #0148BE;
            --primary-hover: #003697;
            --text-dark: #0f172a;
            --text-light: #334155;
            --text-muted: #64748b;
            --bg-light: #f8fafc;
            --white: #ffffff;
            --border: #e2e8f0;
            --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
        }

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

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--bg-light);
            color: var(--text-light);
            line-height: 1.7;
            padding-bottom: 50px;
        }

        /* HEADER NAV */
        header {
            background-color: var(--white);
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: var(--shadow);
        }

        .nav-container {
            max-width: 1000px;
            margin: 0 auto;
            padding: 10px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo-link {
            display: flex;
            align-items: center;
            text-decoration: none;
        }

        .logo-img {
            height: 50px;
            width: auto;
            object-fit: contain;
        }

        .logo-fallback {
            font-family: 'Poppins', sans-serif;
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary);
            letter-spacing: 0.5px;
        }

        .back-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background-color: var(--bg-light);
            color: var(--text-dark);
            text-decoration: none;
            padding: 8px 16px;
            border-radius: 8px;
            font-weight: 600;
            font-size: 0.9rem;
            transition: all 0.2s ease;
            border: 1px solid var(--border);
        }

        .back-btn:hover {
            background-color: var(--border);
            transform: translateX(-2px);
        }

        /* CONTENT CONTAINER */
        .content-container {
            max-width: 850px;
            margin: 40px auto;
            padding: 0 20px;
        }

        .document-card {
            background-color: var(--white);
            border-radius: 16px;
            padding: 50px;
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--border);
        }

        /* DOCUMENT HEADER */
        .doc-header {
            text-align: center;
            margin-bottom: 40px;
            border-bottom: 2px solid var(--bg-light);
            padding-bottom: 30px;
        }

        .doc-header h1 {
            font-family: 'Poppins', sans-serif;
            font-size: 2.2rem;
            color: var(--text-dark);
            margin-bottom: 10px;
            letter-spacing: -0.5px;
        }

        .doc-header p {
            color: var(--text-muted);
            font-size: 0.95rem;
            font-weight: 500;
        }

        /* DOCUMENT BODY */
        .intro-text {
            font-size: 1.05rem;
            margin-bottom: 30px;
            color: var(--text-dark);
        }

        .terms-list {
            list-style: none;
        }

        .term-item {
            margin-bottom: 30px;
        }

        .term-title {
            font-family: 'Poppins', sans-serif;
            font-size: 1.25rem;
            color: var(--text-dark);
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

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

        .term-content {
            padding-left: 28px;
        }

        .term-content p {
            margin-bottom: 10px;
        }

        .term-content ul {
            list-style: none;
            margin-top: 8px;
        }

        .term-content li {
            position: relative;
            padding-left: 20px;
            margin-bottom: 8px;
        }

        .term-content li::before {
            content: "\f105";
            font-family: "Font Awesome 5 Free";
            font-weight: 900;
            position: absolute;
            left: 0;
            color: var(--primary);
        }

        /* SIGNATURE WORKFLOW CONTAINER */
        .signature-card {
            background-color: var(--bg-light);
            border-radius: 12px;
            padding: 30px;
            margin-top: 50px;
            border: 1px solid var(--border);
        }

        .signature-card h2 {
            font-family: 'Poppins', sans-serif;
            font-size: 1.4rem;
            color: var(--text-dark);
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .signature-card h2 i {
            color: var(--primary);
        }

        .signature-card p {
            font-size: 0.9rem;
            color: var(--text-light);
            margin-bottom: 20px;
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            margin-bottom: 20px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .form-group label {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-dark);
        }

        .form-group input {
            padding: 10px 14px;
            border-radius: 8px;
            border: 1px solid var(--border);
            font-family: inherit;
            font-size: 0.95rem;
            transition: all 0.2s ease;
        }

        .form-group input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(1, 72, 190, 0.15);
        }

        /* RENDERED RECEIPT PREVIEW (FOR DISPLAY AND PRINT) */
        .receipt-preview {
            background-color: var(--white);
            border: 2px dashed var(--border);
            border-radius: 8px;
            padding: 25px;
            margin-top: 25px;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .receipt-preview h3 {
            font-family: 'Poppins', sans-serif;
            font-size: 1.1rem;
            color: var(--text-dark);
            border-bottom: 1px solid var(--bg-light);
            padding-bottom: 8px;
            margin-bottom: 5px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .receipt-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px dotted var(--border);
            padding-bottom: 8px;
        }

        .receipt-label {
            font-weight: 600;
            font-size: 0.9rem;
            color: var(--text-muted);
        }

        .receipt-val {
            font-size: 0.95rem;
            color: var(--text-dark);
            font-weight: 500;
        }

        .receipt-val.signature-font {
            font-family: 'Dancing Script', cursive;
            font-size: 1.6rem;
            color: var(--primary);
            transform: rotate(-2deg);
            display: inline-block;
        }

        .print-btn {
            background-color: var(--primary);
            color: var(--white);
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            transition: all 0.2s ease;
            box-shadow: 0 4px 6px -1px rgba(1, 72, 190, 0.2);
            margin-top: 15px;
        }

        .print-btn:hover {
            background-color: var(--primary-hover);
            transform: translateY(-1px);
            box-shadow: 0 6px 10px -1px rgba(1, 72, 190, 0.3);
        }

        .print-btn:active {
            transform: translateY(0);
        }

        /* BACK TO TOP BUTTON */
        .back-to-top {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background-color: var(--white);
            color: var(--text-dark);
            border: 1px solid var(--border);
            width: 45px;
            height: 45px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: var(--shadow-lg);
            transition: all 0.2s ease;
            z-index: 99;
            opacity: 0;
            visibility: hidden;
        }

        .back-to-top.show {
            opacity: 1;
            visibility: visible;
        }

        .back-to-top:hover {
            background-color: var(--primary);
            color: var(--white);
            border-color: var(--primary);
            transform: translateY(-3px);
        }

        /* PRINT STYLING - CRITICAL FOR CLEAN PDF/PRINT OUTPUTS */
        @media print {
            body {
                background-color: #ffffff;
                color: #000000;
                padding-bottom: 0;
                font-size: 11pt;
                line-height: 1.5;
            }

            header, 
            .back-btn, 
            .signature-card h2, 
            .signature-card p, 
            .form-grid, 
            .print-btn, 
            .back-to-top,
            .receipt-preview h3 {
                display: none !important;
            }

            .content-container {
                max-width: 100%;
                margin: 0;
                padding: 0;
            }

            .document-card {
                box-shadow: none;
                border: none;
                padding: 0;
                background-color: transparent;
            }

            .doc-header {
                margin-bottom: 20px;
                padding-bottom: 10px;
                border-bottom: 1px solid #000000;
            }

            .doc-header h1 {
                font-size: 20pt;
            }

            .term-item {
                page-break-inside: avoid;
                margin-bottom: 15px;
            }

            .term-title {
                font-size: 12pt;
                margin-bottom: 5px;
            }

            .term-content {
                padding-left: 15px;
            }

            .term-content li::before {
                content: "\2022"; /* Use standard bullet for printing */
                font-family: inherit;
                left: 5px;
            }

            .signature-card {
                background-color: transparent;
                border: none;
                padding: 0;
                margin-top: 30px;
                page-break-inside: avoid;
            }

            .receipt-preview {
                border: none;
                padding: 0;
                margin-top: 15px;
                background-color: transparent;
                display: block;
            }

            .receipt-row {
                border-bottom: 1px solid #000000;
                padding-bottom: 5px;
                margin-bottom: 10px;
                display: flex;
            }

            .receipt-label {
                color: #000000;
                font-weight: bold;
                width: 180px;
            }

            .receipt-val {
                color: #000000;
            }

            .receipt-val.signature-font {
                font-family: 'Dancing Script', cursive;
                font-size: 16pt;
                color: #000000;
            }
        }

        /* Responsive Breakpoints */
        @media (max-width: 768px) {
            .content-container {
                margin: 20px auto;
            }
            .document-card {
                padding: 30px 20px;
            }
            .form-grid {
                grid-template-columns: 1fr;
                gap: 15px;
            }
            .doc-header h1 {
                font-size: 1.8rem;
            }
        }
    