@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700&display=swap');

:root {
    --primary-color: #1a365d;
    --secondary-color: #2c5282;
    --accent-color: #3182ce;
    --text-color: #2d3748;
    --border-color: #e2e8f0;
    --bg-light: #f7fafc;
    --page-width: 210mm;
    --page-height: 297mm;
    --margin: 15mm;
}

* {
    box-sizing: border-box;
    -webkit-print-color-adjust: exact;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #e2e8f0;
}

/* Page Layout */
.page {
    width: var(--page-width);
    min-height: var(--page-height);
    padding: var(--margin);
    margin: 10mm auto;
    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

@media print {
    body {
        background: none;
    }
    .page {
        margin: 0;
        box-shadow: none;
        page-break-after: always;
    }
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

h1 {
    font-size: 24pt;
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10mm;
    margin-bottom: 10mm;
    text-transform: uppercase;
}

h2 {
    font-size: 18pt;
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
    margin-top: 2rem;
}

h3 {
    font-size: 14pt;
    color: var(--secondary-color);
}

p {
    margin-bottom: 1rem;
    text-align: justify;
}

/* Header & Footer */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10mm;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5mm;
}

.logo-container {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: bold;
    color: var(--primary-color);
}

.institution-name {
    text-align: right;
    font-size: 10pt;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Checklist Styling */
.checklist-container {
    margin-bottom: 5mm;
}

.checklist-group-title {
    font-weight: 700;
    font-size: 11pt;
    margin-top: 10px;
    margin-bottom: 5px;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 3px;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 4px;
    padding: 4px 8px;
    background: var(--bg-light);
    border-radius: 4px;
}

.checklist-item.nested {
    margin-left: 25px;
    background: transparent;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 0;
    padding: 2px 5px;
}

.checkbox {
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--accent-color);
    border-radius: 2px;
    margin-right: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
}

.checkbox.checked::after {
    content: '✓';
    color: var(--accent-color);
    font-weight: bold;
    font-size: 11px;
}

.checklist-text {
    font-size: 9pt;
    line-height: 1.4;
}

.sub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 15px;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    text-align: left;
}

th {
    background-color: var(--bg-light);
    font-weight: 600;
}

/* Signature Section */
.signature-section {
    margin-top: 20mm;
    display: flex;
    justify-content: space-between;
}

.signature-box {
    width: 45%;
    text-align: center;
}

.signature-line {
    margin-top: 15mm;
    border-top: 1px solid black;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5mm;
    margin-top: 10mm;
}

.photo-item {
    border: 1px solid var(--border-color);
    padding: 5px;
    border-radius: 4px;
}

.photo-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 10pt;
    border: 1px dashed #cbd5e1;
}

.photo-caption {
    margin-top: 5px;
    font-size: 9pt;
    text-align: center;
    font-style: italic;
}