.hr-tools-dialog.is-document-capture { width: min(1080px, calc(100vw - 32px)) !important; height: auto; max-height: calc(100dvh - 32px); border-radius: 18px; }
.document-capture { padding: 20px; color: var(--text-color, #334155); }
.capture-notice { padding: 12px 16px; border: 1px solid #b8dfd9; border-radius: 10px; background: #edf8f5; font-size: 13px; }
.capture-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.capture-panel { min-width: 0; padding: 18px; border: 1px solid #dce5ee; border-radius: 14px; background: #fff; }
.capture-panel h3 { margin: 0 0 7px; color: #0f766e; font-size: 16px; font-weight: 600; }
.capture-panel > p, .capture-panel > small { color: #64748b; font-size: 12px; line-height: 1.55; }
.capture-pick-actions, .capture-image-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.capture-file-button { position: relative; overflow: hidden; margin: 0; }
.capture-file-button input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.capture-file-button:focus-within { outline: 3px solid #5fc5bb; outline-offset: 2px; }
.capture-preview { display: grid; place-items: center; min-height: 235px; max-height: 370px; padding: 12px; margin: 16px 0; border: 1px dashed #b6cbd3; border-radius: 12px; background: #f5f8fa; overflow: auto; }
.capture-preview p { color: #64748b; font-size: 13px; text-align: center; }
.capture-preview canvas { max-width: 100%; max-height: 340px; object-fit: contain; box-shadow: 0 3px 12px #0f172a1a; }
.capture-crop, .capture-raw { margin: 12px 0; border: 1px solid #dce5ee; border-radius: 10px; padding: 10px 12px; }
.capture-crop summary, .capture-raw summary { cursor: pointer; color: #0f766e; font-size: 13px; font-weight: 600; }
.capture-crop-grid, .capture-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
.capture-crop-grid { margin-top: 12px; gap: 12px; }
.capture-crop-grid label { font-size: 12px; }
.capture-crop-grid input { display: block; width: 100%; accent-color: #0f766e; }
.capture-fields { margin-top: 24px; }
.capture-field { position: relative; min-width: 0; margin: 0; }
.capture-field > span { position: absolute; top: -8px; left: 10px; padding: 0 5px; background: #fff; color: #0f766e; font-size: 12px; line-height: 16px; z-index: 1; }
.capture-field .form-control { min-height: 44px; border-radius: 10px; font-size: 13px; }
.capture-wide { grid-column: 1 / -1; }
.capture-qr-notice{padding:10px 12px;border:1px solid #b8dfd9;border-radius:10px;background:#edf8f5;font-size:12px;line-height:1.5}
.capture-qr-details{font-size:12px;overflow-wrap:anywhere}
html[data-theme="dark"] .capture-qr-notice{background:#20363a;border-color:#40605f;color:#b3c4cc}
.capture-raw textarea { margin-top: 12px; font-size: 12px; }
.capture-extract { width: 100%; margin-top: 8px; }
.capture-status { margin: 10px 0 0; }
.capture-status.is-error { color: #b42336; }
.capture-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.document-capture .btn { min-height: 40px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.document-capture [hidden] { display: none !important; }
.hr-tool-card-icon .icon-camera { width: 22px; height: 22px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3Z' fill='none' stroke='black' stroke-width='1.8'/%3E%3Ccircle cx='12' cy='13' r='3' fill='none' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E") center / contain no-repeat; }
html[data-theme="dark"] :is(.capture-panel, .capture-field > span) { background: #172b32; border-color: #304852; }
html[data-theme="dark"] :is(.capture-preview, .capture-notice) { background: #20363a; border-color: #40605f; }
html[data-theme="dark"] :is(.capture-field > span, .capture-panel h3, .capture-crop summary, .capture-raw summary) { color: #62d9ce; }
html[data-theme="dark"] :is(.capture-panel > p, .capture-panel > small) { color: #b3c4cc; }
@media (max-width: 720px) {
    .hr-tools-dialog.is-document-capture { width: calc(100vw - 16px) !important; max-height: calc(100dvh - 16px); }
    .document-capture { padding: 12px; }
    .capture-layout { grid-template-columns: minmax(0, 1fr); }
    .capture-panel { padding: 16px 12px; }
}
