/* ===== RESET & BASE ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #525659;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

#wrap {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* ===== INPUT PANEL ===== */
#input {
    width: 380px;
    background: white;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

#input h3 {
    color: #0054a6;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0054a6;
}

#input label {
    display: block;
    font-weight: bold;
    font-size: 12px;
    margin-top: 15px;
    margin-bottom: 5px;
}

#input input,
#input textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
}

#input textarea {
    resize: vertical;
    min-height: 60px;
}

.photo-info {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
    padding: 5px;
    background: #f5f5f5;
    border-radius: 4px;
}

/* ===== PREVIEW PANEL ===== */
#preview {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    background: #525659;
}

#pages {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    width: 100%;
}

/* ===== PDF PAGE ===== */
.page {
    width: 210mm;
    min-height: 297mm;
    background: white;
    padding: 5mm 15mm 5mm 15mm;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    box-sizing: border-box;
    margin: 0 auto;
    position: relative;
}

/* ===== JUDUL ===== */
.judul-laporan {
    text-align: center;
    margin: 0 0 15px 0;
    font-size: 16pt;
    font-weight: bold;
}

/* ===== TABLE ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 5px 0 0 0;
}

td {
    border: 1px solid #000;
    padding: 6px 10px;
    font-size: 12pt;
    vertical-align: top;
}

td:first-child {
    width: 20%;
    font-weight: bold;
    background: #f5f5f5;
}

/* ===== JARAK SECTION ===== */
.section-uraian {
    margin-top: 15px;
    margin-bottom: 5px;
}
.section-hasil {
    margin-top: 20px;
    margin-bottom: 5px;
}
.section-foto {
    margin-top: 20px;
    margin-bottom: 5px;
}
.section-uraian p,
.section-hasil p,
.section-foto p {
    margin-bottom: 8px;
    font-weight: bold;
}

.list-item {
    display: flex;
    margin-bottom: 4px;
    line-height: 1.4;
    font-size: 11pt;
}
.list-number {
    width: 22px;
    flex-shrink: 0;
    font-weight: bold;
}

/* ===== PREVIEW FOTO (INPUT) ===== */
#fotoPreviewContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 15px;
    min-height: 60px;
}

.foto-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: #f9f9f9;
}

.foto-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.foto-preview-item .hapus-foto {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 22px;
    height: 22px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.foto-preview-item .hapus-foto:hover {
    background: #cc0000;
    transform: scale(1.1);
}

/* ===== BUTTON ===== */
.btn {
    margin-top: 15px;
    padding: 12px;
    width: 100%;
    background: linear-gradient(135deg, #0054a6, #003d7a);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s;
}

.btn:hover {
    background: linear-gradient(135deg, #003d7a, #002b5a);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,84,166,0.3);
}

.btn-simpan {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    margin-bottom: 10px;
}

.btn-simpan:hover {
    background: linear-gradient(135deg, #1e7e34, #155d27);
}

/* ===== TANDA TANGAN ===== */
.signature {
    margin-top: 25px;
    display: flex;
    justify-content: flex-end;
}

.sig-box {
    text-align: center;
    width: 220px;
}

.sig-box p {
    margin: 4px 0;
    font-size: 11pt;
}

.sig-box img {
    max-width: 120px;
    max-height: 40px;
    margin: 4px 0;
    object-fit: contain;
}