body{
    margin:0;
    font-family:Calibri, Arial, sans-serif;
}

.container{
    display:flex;
    height:100vh;
}

.left-panel{
    width:400px;
    padding:20px;
    border-right:1px solid #ddd;
}

.right-panel{
    flex:1;
    padding:20px;
}

input,
select{
    width:100%;
    margin-bottom:12px;
    padding:8px;
    box-sizing:border-box;
}

.modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.5);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.modal-box{
    background:#fff;
    padding:20px;
    width:300px;
}

.id-card{
    position:relative;

    width:340px;
    height:540px;

    overflow:hidden;

    background:#fff;

    border-radius:10px;
    border:1px solid #ccc;
}

.front-card .card-bg{
    position:absolute;

    top:0;
    left:0;
    width:100%;
    height:50%;

    background-size:cover;
    background-position:center center;
    background-repeat:no-repeat;
}

.logo-box{
    position:absolute;

    top:12px;

    left:110px;

    transform:none;

    width:120px;
    height:90px;

    overflow:hidden;

    display:flex;
    justify-content:center;
    align-items:center;
}

.front-card #logoWhite{
    max-width:100%;
    max-height:100%;

    width:auto;
    height:auto;

    display:block;
}

.front-card .photo-box{
    position:absolute;

    top:126px;

    left:95px;
    transform:none;

    width:150px;
    height:180px;

    overflow:hidden;
    background:#eee;
    border:1px solid #ddd;
}

#photoPreview{
    width:100%;
    height:100%;
    object-fit:cover;
    display:none;
}

#engPreview{
    position:absolute;
    left:0;
    width:100%;
    top:350px;

    text-align:center;
    font-family:Calibri, Arial, sans-serif;
    font-size:20px;
    font-weight:bold;
}

#thaiPreview{
    position:absolute;
    left:0;
    width:100%;
    top:378px;

    text-align:center;
    font-family:Tahoma, sans-serif;
    font-size:16px;
}

#idPreview{
    position:absolute;
    left:0;
    width:100%;
    top:404px;

    text-align:center;
    font-family:Calibri, Arial, sans-serif;
    font-size:14px;
}

#deptPreview{
    position:absolute;
    left:0;
    width:100%;
    top:428px;

    text-align:center;
    font-family:Calibri, Arial, sans-serif;
    font-size:16px;
}

.preview-wrapper{
    display:flex;
    gap:30px;
    align-items:flex-start;
}

.back-card{
    position:relative;
    padding:15px;
    box-sizing:border-box;
    overflow:hidden;
}

.back-rules{
    font-family:Tahoma,sans-serif;
    font-size:13px;
    line-height:1.5;
}

.rule-title{
    text-align:center;
    font-weight:bold;
    margin-bottom:20px;
}

.back-rules ol{
    padding-left:18px;
    margin:10;
}

.back-logo-box{
    margin-top:20px;
    text-align:center;

    height:120px;

    display:flex;
    justify-content:center;
    align-items:center;
}

#logoColor{
    max-width:60%;
    max-height:100%;

    width:auto;
    height:auto;
}

#hotelName{
    margin-top:10px;
    text-align:center;
    font-weight:bold;
    font-size:16px;
}

#hotelAddress,
#hotelTel,
#hotelWebsite{
    text-align:center;
    font-size:12px;
    margin-top:4px;
}

#cropModal .modal-box{
    position:relative;

    width:90vw;
    max-width:900px;

    height:auto;
    max-height:90vh;

    background:#fff;

    padding:20px;

    overflow:auto;

    display:flex;
    flex-direction:column;
}

#cropImage{
    display:block;

    max-width:100%;
    max-height:65vh;
}

.crop-buttons{
    margin-top:15px;
    text-align:center;
}

.cropper-container{
    max-width:100%;
}

.crop-close{
    position:absolute;

    top:10px;
    right:10px;

    width:32px;
    height:32px;

    padding:0;
    margin:0;

    border:1px solid #ccc;
    background:#fff;

    cursor:pointer;

    font-size:18px;
    line-height:30px;
    text-align:center;

    z-index:9999;
}

.print-buttons{
    margin:10px 0 40px 0;

    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

@media print {

    body *{
        visibility:hidden;
    }

    #cardPreviewFront,
    #cardPreviewFront *{
        visibility:visible;
    }

    #cardPreviewFront{
        position:absolute;
        left:3.1cm;
        top:0.9cm;

        width:5.4cm;
        height:8.56cm;
    }
}

.download-btn{
    display:inline-block;

    padding:8px 12px;

    background:#0078d4;
    color:#fff;

    text-decoration:none;
    border-radius:4px;
}