html,body{margin:0;padding:0;width:100%;height:100%;overflow:hidden;background:#000;font-family:Segoe UI;position:fixed;top:0;left:0;right:0;bottom:0}
#cameraContainer{position:relative;width:100vw;height:100vh;height:100dvh}
#video,#overlay,#preview,#processingCanvas{position:absolute;inset:0;width:100%;height:100%}
#video{object-fit:cover;z-index:1}
#overlay{pointer-events:none;z-index:2}
#processingCanvas{display:none;object-fit:contain;background:#000;z-index:3}
#preview{display:none;object-fit:contain;background:#000;z-index:5}
#previewActions{
    position:absolute;
    left:50%;
    bottom:35px;
    transform:translateX(-50%);
    z-index:6;
    display:flex;
    gap:16px;
}
#previewActions button{
    font-size:16px;
    padding:14px 22px;
    border:none;
    border-radius:30px;
    font-family:inherit;
    box-shadow:0 2px 8px rgba(0,0,0,.4);
}
#btnRetake{
    background:#424242;
    color:#fff;
}
#btnConfirm{
    background:#00c853;
    color:#fff;
    font-weight:600;
}
#resultsPanel{
    position:absolute;
    inset:0;
    z-index:8;
    background:rgba(0,0,0,.94);
    color:#fff;
    display:flex;
    flex-direction:column;
    padding:24px 20px;
    overflow-y:auto;
    box-sizing:border-box;
}
#resultsPanel h2{
    margin:0 0 18px;
    font-size:20px;
    font-weight:600;
}
#resultsFields{
    flex:1;
}
.resultRow{
    display:flex;
    justify-content:space-between;
    align-items:baseline;
    gap:12px;
    padding:12px 0;
    border-bottom:1px solid rgba(255,255,255,.12);
}
.resultLabel{
    color:#9e9e9e;
    font-size:14px;
    flex-shrink:0;
}
.resultValue{
    font-weight:600;
    text-align:right;
    font-size:16px;
}
.resultValue.empty{
    color:#616161;
    font-weight:400;
    font-style:italic;
}
.resultConfidence{
    margin-top:16px;
    font-size:13px;
    color:#9e9e9e;
    text-align:center;
}
.resultsActions{
    margin-top:20px;
    display:flex;
    gap:12px;
}
.resultsActions button{
    flex:1;
    font-size:15px;
    padding:14px 10px;
    border:none;
    border-radius:30px;
    color:#fff;
    font-family:inherit;
}
#btnRetakeFromResults{
    background:#424242;
}
#btnSendToTms{
    background:#616161;
    opacity:.5;
}
#status{position:absolute;left:50%;transform:translateX(-50%);bottom:120px;color:#fff;background:rgba(0,0,0,.55);padding:10px 18px;border-radius:20px;z-index:10}
#btnCapture{position:absolute;left:50%;transform:translateX(-50%);bottom:25px;width:84px;height:84px;border-radius:50%;border:none;font-size:30px;z-index:10}
#devPanel{
    position:absolute;
    top:0;
    right:0;
    width:320px;
    height:100%;
    background:#202020EE;
    color:white;
    z-index:999;
    overflow:auto;
    padding:20px;
}
.hidden{
    display:none !important;
}
.devHeader{
    font-size:22px;
    margin-bottom:20px;
}
.devBody{
    display:flex;
    flex-direction:column;
    gap:10px;
}
.devBody input{
    width:100%;
}
.devBody select{
    height:36px;
}