/* RESET AND BASE STYLING */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none; /* Disable text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body {
    background-color: #323639;
    font-family: Arial, Helvetica, sans-serif;
    color: #2b2b2b;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 50px;
    overflow-x: hidden;
}

/* TOP TOOLBAR */
.top-bar {
    width: 100%;
    background-color: #1e293b;
    color: #ffffff;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.company-name {
    font-weight: bold;
    color: #38bdf8;
}

.status-badge {
    background-color: #0f172a;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid #334155;
    color: #e2e8f0;
}

/* WATERMARK OVERLAY */
.watermark-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    opacity: 0.04;
    transform: rotate(-30deg);
}

.watermark-overlay span {
    font-size: 3.5rem;
    font-weight: 900;
    color: #000;
    white-space: nowrap;
}

/* DOCUMENT LAYOUT (SIMULATING A4 PAGES) */
.document-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.page {
    width: 210mm;
    min-height: 297mm;
    background-color: #ffffff;
    padding: 20mm 18mm 18mm 18mm;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

/* HEADER TABLE */
.doc-header {
    margin-bottom: 20px;
}

.header-table {
    width: 100%;
    border-collapse: collapse;
}

.header-table td {
    border: 1.5px solid #1e3a8a;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
}

.header-logo {
    width: 30%;
    background-color: #f8fafc;
}

.company-brand h2 {
    font-size: 1.1rem;
    color: #1e3a8a;
    letter-spacing: 0.5px;
}

.company-brand p {
    font-size: 0.75rem;
    color: #475569;
}

.header-title h1 {
    font-size: 1.05rem;
    color: #0f172a;
    text-transform: uppercase;
}

.header-meta {
    width: 25%;
    font-size: 0.8rem;
    text-align: left !important;
    background-color: #f8fafc;
}

.page-number {
    text-align: right;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 4px;
}

/* CONTENT STYLING */
.doc-content {
    flex-grow: 1;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #1e293b;
    text-align: justify;
}

.doc-content section {
    margin-bottom: 16px;
}

.doc-content h2 {
    font-size: 0.98rem;
    color: #1e3a8a;
    margin-bottom: 6px;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 2px;
}

.doc-content p {
    margin-bottom: 8px;
}

.doc-content ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.doc-content li {
    margin-bottom: 6px;
}

.bullet-list li {
    list-style-type: square;
}

.contact-box {
    background-color: #f1f5f9;
    border-left: 4px solid #1e3a8a;
    padding: 10px 14px;
    margin: 10px 0;
    font-size: 0.88rem;
}

.contact-box p {
    margin-bottom: 4px;
}

.signature-date {
    margin-top: 20px;
    text-align: right;
}

/* FOOTER TABLE */
.doc-footer {
    margin-top: 20px;
}

.footer-table {
    width: 100%;
    border-collapse: collapse;
}

.footer-table td {
    border: 1.5px solid #1e3a8a;
    padding: 8px 12px;
    width: 50%;
    font-size: 0.8rem;
    background-color: #f8fafc;
}

.footer-table span {
    color: #64748b;
    font-size: 0.75rem;
}

/* HIDE PRINTING ENTIRELY */
@media print {
    body {
        display: none !important;
    }
}
