:root {
    --primary-color: #003399; /* Deep blue used by Nityo */
    --text-color: #333;
    --border-color: #000;
    --bg-gray: #f2f2f2;
    --highlight-color: #ffff00;
}

body {
    background-color: #ccc;
    font-family: "Times New Roman", Times, serif;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    color: var(--text-color);
}

.page-container {
    width: 210mm;
    min-height: 297mm;
    background: white;
    padding: 10mm 10mm 10mm 20mm;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    margin-bottom: 20px;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, background 0.2s;
}

.btn:hover {
    background: #002266;
    transform: translateY(-2px);
}

header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
    height: 45px;
}

.logo-container {
    text-align: right;
}

.logo-container img {
    max-height: 45px;
    width: auto;
}

.image-section {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.image-box {
    flex: 1;
    height: 250px;
    border: 1px dashed #bbb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    background-color: #fcfcfc;
    background-repeat: no-repeat;
    background-position: center 40%;
    background-size: 80px;
    transition: border-color 0.3s;
}

.image-box:hover {
    border-color: var(--primary-color);
}

/* Photo Placeholder */
.image-box:first-child {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23bbb' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
}

/* ID/PAN Placeholder */
.image-box:last-child {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23bbb' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.11-.9-2-2-2zm0 14H4V6h16v12zM6 10h2v2H6zm0 4h8v2H6zm10 0h2v2h-2zm-6-4h8v2h-8z'/%3E%3C/svg%3E");
}

.image-box.has-image {
    background-image: none !important;
    border-style: solid;
}

.image-box.has-image .upload-overlay {
    display: none;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    background: white;
}

.image-box img:not([src]), 
.image-box img[src=""] {
    display: none;
}

.upload-overlay {
    position: relative;
    z-index: 3;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    color: #444;
    padding: 6px;
    font-size: 12px;
    text-align: center;
    border-top: 1px solid #ddd;
    font-weight: bold;
}

.title-header {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    text-decoration: underline;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    table-layout: fixed;
}

table, th, td {
    border: 1px solid var(--border-color);
}

th, td {
    padding: 6px 8px;
    font-size: 13px;
    word-wrap: break-word;
}

.label-cell {
    background-color: #e0e0e0;
    width: 25%;
}

input, textarea {
    width: 100%;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    background: transparent;
    padding: 2px;
}

textarea {
    resize: none;
}

.highlight {
    background-color: var(--highlight-color);
}

.highlight input {
    font-weight: bold;
    font-size: 15px;
}

.section-head {
    background-color: #f2f2f2;
    font-weight: bold;
    text-align: center;
}

.sme-details {
    margin-top: 10px;
}

.sme-details ul {
    list-style: none;
    padding-left: 20px;
    margin: 5px 0;
}

/* Project and List Styles */
.project-list {
    margin-left: 30px;
    font-weight: bold;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.project-item {
    display: flex;
}

.project-item .roman-num {
    width: 30px;
}

.responsibility-list {
    margin-left: 60px;
    margin-top: 15px;
}

.responsibility-item {
    display: flex;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.arrow-bullet {
    width: 30px;
    font-size: 16px;
    flex-shrink: 0;
}

@media print {
    @page {
        size: A4;
        margin: 0;
    }
    body {
        background: none;
        padding: 0;
        margin: 0;
        display: block;
    }
    .controls {
        display: none;
    }
    .page-container {
        box-shadow: none;
        margin: 0;
        padding: 10mm 10mm 10mm 20mm;
        width: 210mm;
        height: 297mm;
        page-break-after: always;
        break-after: page;
        position: relative;
        overflow: hidden; /* Keeps content strictly within the A4 boundary */
    }
    header {
        margin-bottom: 15px;
    }
    .image-box .upload-overlay {
        display: none;
    }
}
