body{font-family:Arial,sans-serif;background:#f4f6f9;margin:0;padding:0}
.wrap{width:1200px;max-width:96%;margin:25px auto}
.card{background:#fff;border-radius:12px;box-shadow:0 0 14px rgba(0,0,0,.08);padding:20px;margin-bottom:18px}
h2,h3,h4{margin-top:0}
.msg{background:#e8f5e9;color:#2e7d32;padding:12px;border-radius:8px;margin-bottom:14px}
.err{background:#ffebee;color:#c62828;padding:12px;border-radius:8px;margin-bottom:14px}
.section-title{background:#1976d2;color:#fff;padding:10px 14px;border-radius:8px;margin:20px 0 14px 0;font-weight:bold}
.sub-title{background:#f1f5fb;color:#1a237e;padding:10px 14px;border-left:4px solid #1976d2;border-radius:6px;margin:18px 0 12px 0;font-weight:bold}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px}
label{display:block;font-weight:bold;margin-bottom:6px}
input[type=text],input[type=email],input[type=date],input[type=number],select,textarea{
    width:100%;padding:10px;border:1px solid #ccc;border-radius:8px;box-sizing:border-box
}
input[disabled]{background:#f3f4f6;color:#333;cursor:not-allowed}
textarea{min-height:90px;resize:vertical}
.help{font-size:12px;color:#666;margin-top:5px}
.uploaded-note{font-size:12px;color:#1b5e20;margin-top:5px;font-weight:bold}
.inline-check{display:flex;gap:8px;align-items:flex-start;margin-top:8px}
.actions{margin-top:20px;display:flex;gap:10px;flex-wrap:wrap}
button{padding:11px 18px;border:0;background:#1976d2;color:#fff;border-radius:8px;cursor:pointer;font-weight:bold}
button:hover{background:#0d47a1}
.btn-green{background:#2e7d32}
.btn-green:hover{background:#1b5e20}
.btn-orange{background:#ef6c00}
.btn-orange:hover{background:#d84315}
.linkbtn{display:inline-block;padding:11px 18px;background:#616161;color:#fff;text-decoration:none;border-radius:8px;font-weight:bold}
.linkbtn:hover{background:#424242}
.note-box{background:#fff8e1;border:1px solid #ffe082;color:#7a5a00;padding:12px;border-radius:8px;margin-bottom:16px}
.field-error{color:#c62828;font-size:12px;margin-top:5px;display:none}
.preview-box{border:1px solid #d7e3f4;border-radius:10px;overflow:hidden;margin-bottom:18px}
.preview-head{background:#e3f2fd;color:#0d47a1;padding:10px 14px;font-weight:bold}
.preview-body{padding:14px;background:#fff}
.preview-table{width:100%;border-collapse:collapse}
.preview-table td{border-bottom:1px solid #eee;padding:10px 8px;vertical-align:top}
.preview-table td:first-child{width:300px;font-weight:bold}
.mono{font-family:Consolas,monospace}
.inline-forms{display:flex;gap:10px;flex-wrap:wrap}
.inline-forms form{display:inline-block;margin:0}
.login-info{color:#555;font-size:13px}
.full-row{grid-column:1 / -1}
.normal-label{font-weight:normal;margin:0}
.mt14{margin-top:14px}
.copy-row{margin-bottom:12px}

.preview-image-wrap{margin-top:10px}
.preview-photo-img{
    width:2in;
    height:3in;
    object-fit:cover;
    border:1px solid #cfd8dc;
    border-radius:8px;
    background:#fff;
    padding:4px;
    display:block;
    box-sizing:border-box;
}
.preview-signature-img{
    width:3in;
    height:1in;
    object-fit:contain;
    border:1px solid #cfd8dc;
    border-radius:8px;
    background:#fff;
    padding:4px;
    display:block;
    box-sizing:border-box;
}
.preview-file-link{
    display:inline-block;
    margin-top:8px;
    padding:6px 10px;
    background:#1976d2;
    color:#fff;
    text-decoration:none;
    border-radius:6px;
    font-weight:bold;
    font-family:Arial,sans-serif;
}
.preview-file-link:hover{
    background:#0d47a1;
}

@media(max-width:900px){
    .grid-2,.grid-3{grid-template-columns:1fr}
    .preview-table td:first-child{width:180px}
    .preview-photo-img{
        width:160px;
        height:240px;
    }
    .preview-signature-img{
        width:240px;
        height:80px;
    }
}