.sign-pdf-page {
    --sign-primary: #2d86df;
    --sign-primary-dark: #1766b5;
    --sign-ink: #10213e;
    --sign-muted: #64748b;
    --sign-border: #dbe5f1;
    --sign-soft: #f6f9fd;
    --sign-danger: #dc3545;
    padding: 24px 0 64px;
}

.sign-pdf-card {
    background: #fff;
    border: 1px solid var(--sign-border);
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(32, 61, 96, .08);
    padding: 36px;
}

.sign-pdf-intro {
    max-width: 790px;
    margin: 0 auto 28px;
    text-align: center;
}

.sign-pdf-eyebrow {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 7px 12px;
    border-radius: 100px;
    background: #eaf4ff;
    color: var(--sign-primary-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.sign-pdf-intro h1 {
    margin: 13px 0 9px;
    color: var(--sign-ink);
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 800;
}

.sign-pdf-intro p {
    margin: 0;
    color: #4d627d;
    font-size: 16px;
    line-height: 1.65;
}

.sign-pdf-switch-tool {
    display: inline-flex;
    margin-top: 14px;
    padding: 8px 12px;
    border: 1px solid var(--sign-primary);
    border-radius: 8px;
    align-items: center;
    color: var(--sign-primary);
    background: #f2f8ff;
    font-size: 13px;
    font-weight: 700;
    gap: 7px;
    text-decoration: none;
}

.sign-pdf-switch-tool:hover { color: #fff; background: var(--sign-primary); }

.sign-pdf-alert {
    margin: 0 auto 18px;
    max-width: 900px;
    padding: 12px 16px;
    border: 1px solid #f3bdc4;
    border-radius: 10px;
    background: #fff1f2;
    color: #a42536;
    text-align: center;
}

.sign-pdf-alert.is-success {
    border-color: #b9e7d0;
    background: #edfff4;
    color: #167246;
}

.sign-pdf-alert.is-warning {
    border-color: #f0d78c;
    background: #fff9e8;
    color: #88610b;
}

.sign-pdf-alert.is-info {
    border-color: #b9daf5;
    background: #edf7ff;
    color: #176799;
}

.sign-pdf-modal-body .form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 .16rem rgba(220, 53, 69, .12);
}

.sign-pdf-field-error {
    display: block;
    margin: -9px 0 12px;
    color: #c92a3b;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
}

.sign-pdf-upload {
    display: flex;
    min-height: 300px;
    padding: 42px 24px;
    border: 2px dashed #b9cbe1;
    border-radius: 16px;
    background: linear-gradient(145deg, #fbfdff, #f2f7fd);
    align-items: center;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    outline: none;
    text-align: center;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.sign-pdf-upload:hover,
.sign-pdf-upload:focus,
.sign-pdf-upload.is-dragging {
    border-color: var(--sign-primary);
    background: #edf6ff;
    transform: translateY(-1px);
}

.sign-pdf-upload-icon {
    display: grid;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 18px;
    place-items: center;
    background: #e2efff;
    color: var(--sign-primary);
    font-size: 30px;
}

.sign-pdf-upload h2 {
    margin: 0 0 7px;
    color: var(--sign-ink);
    font-size: 22px;
    font-weight: 750;
}

.sign-pdf-upload p {
    max-width: 520px;
    margin: 0 0 18px;
    color: #607089;
}

.sign-pdf-upload-button,
.sign-pdf-download-actions .btn {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 10px 19px;
    border-radius: 9px;
    font-weight: 700;
}

.sign-pdf-upload small {
    display: block;
    margin-top: 14px;
    color: #7a889a;
}

.sign-pdf-workspace {
    min-width: 0;
}

.sign-pdf-file-status {
    display: flex;
    min-width: 0;
    margin-bottom: 16px;
    padding: 13px 15px;
    border: 1px solid var(--sign-border);
    border-radius: 12px;
    align-items: center;
    gap: 14px;
    background: #fbfdff;
}

.sign-pdf-file-info {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: 11px;
}

.sign-pdf-file-info div {
    min-width: 0;
    flex: 1 1 auto;
}

.sign-pdf-file-info strong,
.sign-pdf-file-info span:not(.sign-pdf-file-icon) {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sign-pdf-file-info strong {
    color: var(--sign-ink);
    font-size: 14px;
}

.sign-pdf-file-info span:not(.sign-pdf-file-icon) {
    color: var(--sign-muted);
    font-size: 12px;
}

.sign-pdf-file-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    place-items: center;
    background: #ffe8ea;
    color: #e74558;
    font-size: 18px;
}

.sign-pdf-file-icon i {
    display: block;
    width: auto;
    max-width: none;
    overflow: visible;
    font-size: inherit;
    line-height: 1;
}

.sign-pdf-file-complete {
    color: #198754;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.sign-pdf-new-file {
    white-space: nowrap;
}

.sign-pdf-editor-shell {
    display: grid;
    overflow: hidden;
    height: clamp(620px, calc(100vh - 130px), 760px);
    min-height: 620px;
    max-height: 760px;
    border: 1px solid var(--sign-border);
    border-radius: 16px;
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
}

.sign-pdf-thumbnails {
    overflow: auto;
    min-height: 0;
    padding: 14px;
    border-right: 1px solid var(--sign-border);
    background: #f8fafc;
}

.sign-pdf-panel-heading {
    display: flex;
    margin: 0 1px 12px;
    align-items: center;
    color: var(--sign-ink);
    font-size: 13px;
    font-weight: 750;
    justify-content: space-between;
}

.sign-pdf-count {
    color: var(--sign-muted);
    font-size: 11px;
}

.sign-pdf-thumbnail-list {
    display: grid;
    gap: 11px;
}

.sign-pdf-thumbnail {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 7px;
    border: 1px solid #dce5ef;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.sign-pdf-thumbnail:hover,
.sign-pdf-thumbnail.is-active {
    border-color: var(--sign-primary);
    box-shadow: 0 0 0 2px rgba(45, 134, 223, .16);
}

.sign-pdf-thumbnail canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 3px;
}

.sign-pdf-thumbnail span {
    display: block;
    margin-top: 5px;
    color: #53657d;
    font-size: 11px;
    font-weight: 700;
}

.sign-pdf-editor {
    display: flex;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    flex-direction: column;
    background: #f3f6fa;
}

.sign-pdf-toolbar {
    display: flex;
    min-height: 66px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--sign-border);
    align-items: center;
    background: #fff;
    gap: 12px;
    justify-content: space-between;
}

.sign-pdf-tool-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sign-pdf-tool-group-main {
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
}

.sign-pdf-tool {
    display: inline-flex;
    min-height: 40px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    align-items: center;
    background: transparent;
    color: #40536b;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    gap: 6px;
    white-space: nowrap;
}

.sign-pdf-tool:hover,
.sign-pdf-tool:focus-visible,
.sign-pdf-tool.is-active {
    border-color: #c8def5;
    background: #edf6ff;
    color: var(--sign-primary-dark);
    outline: none;
}

.sign-pdf-tool-icon {
    width: 38px;
    padding: 6px;
    justify-content: center;
}

.sign-pdf-toolbar-divider {
    width: 1px;
    height: 27px;
    margin: 0 3px;
    background: #d9e3ee;
}

.sign-pdf-zoom-label {
    min-width: 52px;
    padding: 5px;
    border: 0;
    background: transparent;
    color: #526276;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.sign-pdf-selection-tools {
    display: flex;
    min-height: 55px;
    padding: 8px 13px;
    border-bottom: 1px solid var(--sign-border);
    align-items: center;
    background: #eef7ff;
    gap: 10px;
}

.sign-pdf-selection-tools > span,
.sign-pdf-selection-tools > label {
    color: #3f5876;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.sign-pdf-selection-tools > span {
    margin-right: auto;
}

.sign-pdf-selection-tools input[type="range"] {
    width: 110px;
    accent-color: var(--sign-primary);
}

.sign-pdf-selection-tools input[type="color"] {
    width: 30px;
    height: 27px;
    padding: 2px;
    border: 1px solid #b8c9dc;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
}

.sign-pdf-selection-tools output {
    min-width: 34px;
    color: #49647e;
    font-size: 12px;
}

.sign-pdf-viewer {
    position: relative;
    display: flex;
    min-height: 0;
    flex: 1;
    padding: 25px;
    align-items: flex-start;
    justify-content: center;
    overflow: auto;
}

.sign-pdf-stage {
    position: relative;
    display: none;
    flex: 0 0 auto;
    box-shadow: 0 5px 20px rgba(15, 32, 58, .22);
    line-height: 0;
}

.sign-pdf-stage.is-ready {
    display: block;
}

.sign-pdf-stage canvas {
    display: block;
    background: #fff;
    position: relative;
    z-index: 1;
}

.sign-pdf-overlay {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 2;
    line-height: normal;
    pointer-events: auto;
    touch-action: none;
}

.sign-pdf-loading {
    display: flex;
    min-height: 160px;
    align-items: center;
    color: #55708b;
    font-size: 14px;
    gap: 9px;
}

.sign-pdf-loading.d-none + .sign-pdf-stage,
.sign-pdf-stage.is-ready {
    display: block;
}

.sign-pdf-annotation {
    position: absolute;
    display: flex;
    min-width: 24px;
    min-height: 20px;
    border: 2px dashed transparent;
    align-items: center;
    cursor: move;
    pointer-events: auto;
    touch-action: none;
    transform-origin: center center;
    user-select: none;
    overflow: visible;
}

.sign-pdf-annotation:hover {
    border: 2px dashed var(--sign-primary);
    box-shadow: none;
}

.sign-pdf-annotation.is-selected {
    border-color: transparent;
    box-shadow: none;
}

.sign-pdf-selection-frame {
    position: absolute;
    box-sizing: border-box;
    border: 2px dashed var(--sign-primary);
    pointer-events: none;
    touch-action: none;
    transform-origin: center center;
    overflow: visible;
}

.sign-pdf-annotation-text {
    display: block;
    width: 100%;
    overflow: hidden;
    color: inherit;
    line-height: 1.15;
    overflow-wrap: anywhere;
    pointer-events: auto;
    cursor: move;
    user-select: none;
    white-space: pre-wrap;
}

.sign-pdf-annotation-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: auto;
    cursor: move;
    user-select: none;
    -webkit-user-drag: none;
}

.sign-pdf-annotation-stamp .sign-pdf-annotation-text {
    display: flex;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: .17em .3em;
    border: .1em solid currentColor;
    border-radius: .14em;
    font-weight: 800;
    letter-spacing: .04em;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
}

.sign-pdf-check-mark {
    display: flex;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    overflow: visible;
    font-family: Arial, Helvetica, sans-serif !important;
    font-weight: 800;
    line-height: 1;
}

.sign-pdf-check-mark.is-circle,
.sign-pdf-check-mark.is-box {
    border: .09em solid currentColor;
}

.sign-pdf-check-mark.is-circle {
    border-radius: 50%;
}

.sign-pdf-annotation-handle,
.sign-pdf-annotation-remove,
.sign-pdf-annotation-rotate {
    position: absolute;
    display: none;
    z-index: 2;
    border: 0;
    cursor: pointer;
}

.sign-pdf-annotation.is-selected .sign-pdf-annotation-handle,
.sign-pdf-annotation.is-selected .sign-pdf-annotation-remove,
.sign-pdf-annotation.is-selected .sign-pdf-annotation-rotate {
    display: grid !important;
    place-items: center;
    visibility: visible;
}

.sign-pdf-selection-frame .sign-pdf-annotation-handle,
.sign-pdf-selection-frame .sign-pdf-annotation-remove,
.sign-pdf-selection-frame .sign-pdf-annotation-rotate {
    display: grid !important;
    place-items: center;
    visibility: visible;
    pointer-events: auto;
}

.sign-pdf-annotation-rotate {
    top: -25px;
    left: 50%;
    width: 22px;
    height: 22px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #7c3aed;
    color: #fff;
    cursor: grab;
    font-size: 9px;
    transform: translateX(-50%);
    z-index: 30;
}

.sign-pdf-annotation-rotate:active {
    cursor: grabbing;
}

.sign-pdf-annotation-handle {
    right: -8px;
    bottom: -8px;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 2px;
    background: var(--sign-primary);
    cursor: nwse-resize;
    z-index: 30;
}

.sign-pdf-annotation-remove {
    top: -10px;
    right: -10px;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--sign-danger);
    color: #fff;
    font-size: 11px;
    z-index: 30;
}

.sign-pdf-page-navigation {
    display: flex;
    padding: 10px 15px;
    border-top: 1px solid var(--sign-border);
    align-items: center;
    background: #fff;
    gap: 12px;
    justify-content: center;
}

.sign-pdf-page-navigation .btn {
    min-width: 104px;
}

.sign-pdf-page-navigation span {
    min-width: 88px;
    color: #506177;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.sign-pdf-privacy-note {
    display: flex;
    margin: 16px 0 0;
    color: #3b5e78;
    font-size: 13px;
    gap: 8px;
    justify-content: center;
    text-align: center;
}

.sign-pdf-privacy-note i {
    color: #249267;
    margin-top: 2px;
}

.sign-pdf-download-actions {
    display: flex;
    margin-top: 19px;
    gap: 10px;
    justify-content: flex-end;
}

.sign-pdf-download-actions #sign-pdf-download {
    min-width: 210px;
}

.sign-pdf-modal {
    position: fixed;
    z-index: 1080;
    inset: 0;
    display: grid;
    padding: 18px;
    place-items: center;
}

.sign-pdf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 28, 48, .58);
}

.sign-pdf-modal-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(620px, 100%);
    max-height: calc(100vh - 36px);
    border-radius: 15px;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
}

.sign-pdf-modal-dialog-small {
    width: min(500px, 100%);
}

.sign-pdf-modal-header,
.sign-pdf-modal-footer {
    display: flex;
    padding: 16px 20px;
    align-items: center;
    gap: 12px;
}

.sign-pdf-modal-header {
    border-bottom: 1px solid var(--sign-border);
    justify-content: space-between;
}

.sign-pdf-modal-header h2 {
    margin: 0;
    color: var(--sign-ink);
    font-size: 20px;
    font-weight: 750;
}

.sign-pdf-modal-header h2 i {
    color: var(--sign-primary);
    font-size: 18px;
}

.sign-pdf-modal-close {
    display: grid;
    width: 33px;
    height: 33px;
    border: 0;
    border-radius: 7px;
    place-items: center;
    background: #f2f5f8;
    color: #41526a;
    cursor: pointer;
}

.sign-pdf-signature-tabs {
    display: grid;
    overflow: hidden;
    margin: 24px 24px 0;
    padding: 0;
    border: 1px solid #d9e3ef;
    border-radius: 11px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sign-pdf-signature-tabs button {
    display: flex;
    min-height: 62px;
    padding: 8px 10px;
    border: 0;
    border-right: 1px solid #d9e3ef;
    align-items: center;
    flex-direction: column;
    background: transparent;
    color: #65758a;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    gap: 5px;
    justify-content: center;
}

.sign-pdf-signature-tabs button:last-child {
    border-right: 0;
}

.sign-pdf-signature-tabs button i {
    font-size: 17px;
}

.sign-pdf-signature-tabs button.active {
    background: var(--sign-primary);
    color: #fff;
}

.sign-pdf-modal-body {
    overflow: auto;
    padding: 20px;
}

.sign-pdf-modal-body label {
    display: block;
    margin: 0 0 7px;
    color: #3c4c61;
    font-size: 13px;
    font-weight: 700;
}

.sign-pdf-modal-body input:not([type="color"]):not([type="range"]),
.sign-pdf-modal-body textarea,
.sign-pdf-modal-body select {
    margin-bottom: 16px;
}

.sign-pdf-signature-pane {
    display: none;
}

.sign-pdf-signature-pane.active {
    display: block;
}

.sign-pdf-signature-preview {
    display: flex;
    min-height: 80px;
    padding: 10px 16px;
    border: 1px dashed #bacadd;
    border-radius: 9px;
    align-items: center;
    color: var(--sign-ink);
    font-size: 34px;
    line-height: 1;
}

.sign-pdf-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

#sign-pdf-signature-modal .sign-pdf-modal-body {
    padding: 24px;
}

#sign-pdf-signature-modal .sign-pdf-signature-pane[data-signature-pane="type"] .form-control {
    min-height: 50px;
    margin-bottom: 16px;
    border-color: #d9e3ef;
    border-radius: 9px;
    font-size: 16px;
}

.sign-pdf-signature-font-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.sign-pdf-font-choice {
    display: grid;
    min-height: 57px;
    padding: 7px 10px;
    border: 2px solid #dfe7f0;
    border-radius: 9px;
    place-items: center;
    background: #fff;
    color: var(--sign-ink);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.sign-pdf-font-choice:hover,
.sign-pdf-font-choice.active {
    border-color: var(--sign-primary);
    background: #eef6ff;
    box-shadow: 0 3px 10px rgba(27, 112, 214, .08);
}

.sign-pdf-font-choice span {
    display: block;
    width: 100%;
    overflow: hidden;
    font-size: 21px;
    line-height: 1.1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sign-pdf-font-choice[data-signature-font-choice="cursive"] span,
.sign-pdf-font-choice[data-signature-font-choice="bold"] span {
    font-family: "Brush Script MT", "Segoe Script", cursive;
}

.sign-pdf-font-choice[data-signature-font-choice="elegant"] span {
    font-family: "Snell Roundhand", "Apple Chancery", "URW Chancery L", cursive;
}

.sign-pdf-font-choice[data-signature-font-choice="formal"] span {
    font-family: "Monotype Corsiva", "Lucida Handwriting", cursive;
}

.sign-pdf-font-choice[data-signature-font-choice="handwritten"] span,
.sign-pdf-font-choice[data-signature-font-choice="casual"] span {
    font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
}

.sign-pdf-font-choice[data-signature-font-choice="classic"] span {
    font-family: Georgia, serif;
    font-style: italic;
}

.sign-pdf-font-choice[data-signature-font-choice="modern"] span {
    font-family: Arial, sans-serif;
    font-style: italic;
    font-weight: 600;
}

.sign-pdf-font-choice[data-signature-font-choice="bold"] span {
    font-weight: 800;
}

.sign-pdf-font-choice[data-signature-font-choice="great-vibes"] span {
    font-family: "Great Vibes", cursive;
    font-size: 25px;
}

.sign-pdf-font-choice[data-signature-font-choice="dancing-script"] span {
    font-family: "Dancing Script", cursive;
    font-size: 23px;
    font-weight: 600;
}

.sign-pdf-font-choice[data-signature-font-choice="allura"] span {
    font-family: Allura, cursive;
    font-size: 25px;
}

.sign-pdf-font-choice[data-signature-font-choice="alex-brush"] span {
    font-family: "Alex Brush", cursive;
    font-size: 25px;
}

.sign-pdf-modal-help {
    margin: 0 0 12px;
    color: #66788f;
    font-size: 13px;
}

.sign-pdf-draw-canvas {
    display: block;
    width: 100%;
    height: 180px;
    border: 2px dashed #b7c8dc;
    border-radius: 10px;
    background: #fbfdff;
    cursor: crosshair;
    touch-action: none;
}

.sign-pdf-draw-actions,
.sign-pdf-camera-actions {
    display: flex;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.sign-pdf-camera-controls {
    display: flex;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.sign-pdf-camera-facing {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.sign-pdf-camera-facing .btn {
    white-space: nowrap;
}

.sign-pdf-camera-facing .btn.active {
    border-color: var(--sign-primary);
    background: var(--sign-primary);
    color: #fff;
    box-shadow: none;
}

.sign-pdf-image-drop {
    display: flex;
    width: 100%;
    min-height: 132px;
    padding: 15px;
    border: 2px dashed #b7c8dc;
    border-radius: 10px;
    align-items: center;
    flex-direction: column;
    background: #fbfdff;
    color: #456078;
    cursor: pointer;
    gap: 8px;
    justify-content: center;
}

.sign-pdf-image-drop i {
    color: var(--sign-primary);
    font-size: 27px;
}

.sign-pdf-image-drop span {
    font-weight: 700;
}

.sign-pdf-image-drop small {
    color: #718198;
}

.sign-pdf-upload-preview,
.sign-pdf-camera-video {
    display: block;
    width: 100%;
    max-height: 230px;
    margin-top: 14px;
    border: 1px solid #d7e3ef;
    border-radius: 9px;
    object-fit: contain;
}

.sign-pdf-camera-video {
    background: #172335;
}

.sign-pdf-signature-options,
.sign-pdf-text-options {
    display: grid;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid var(--sign-border);
    align-items: center;
    gap: 10px;
    grid-template-columns: auto 46px auto minmax(100px, 1fr) auto;
}

.sign-pdf-check-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.sign-pdf-check-choice {
    display: grid;
    min-height: 90px;
    padding: 12px;
    border: 1px solid #d7e1ee;
    border-radius: 10px;
    place-items: center;
    gap: 7px;
    color: #53657c;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
}

.sign-pdf-check-choice i {
    font-size: 25px;
}

.sign-pdf-check-choice:hover,
.sign-pdf-check-choice.active {
    border-color: var(--sign-primary);
    color: var(--sign-primary);
    background: #edf5ff;
    box-shadow: 0 0 0 1px var(--sign-primary);
}

.sign-pdf-check-color-control {
    display: flex;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid var(--sign-border);
    align-items: center;
    gap: 12px;
}

.sign-pdf-check-color-control label {
    margin: 0;
}

.sign-pdf-check-color-control input[type="color"] {
    width: 38px;
    height: 33px;
    padding: 2px;
    border: 1px solid #bfcddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.sign-pdf-signature-options {
    display: flex;
    margin-top: 18px;
    padding-top: 0;
    border-top: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    grid-template-columns: none;
}

.sign-pdf-signature-colors {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.sign-pdf-signature-color-choice,
.sign-pdf-custom-color {
    display: block;
    width: 31px;
    height: 31px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--signature-color, #fff);
    cursor: pointer;
}

.sign-pdf-signature-color-choice.active {
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--sign-primary);
}

.sign-pdf-custom-color {
    position: relative;
    overflow: hidden;
    border: 1px solid #c9d5e3;
    background: conic-gradient(#f33, #fd3, #3f3, #3cf, #63f, #f3c, #f33);
}

.sign-pdf-custom-color input[type="color"] {
    position: absolute;
    inset: -3px;
    width: calc(100% + 6px) !important;
    height: calc(100% + 6px) !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0;
    cursor: pointer;
}

.sign-pdf-signature-size-control {
    display: flex;
    min-width: 180px;
    align-items: center;
    flex: 1 1 180px;
    gap: 9px;
}

.sign-pdf-signature-size-control label {
    margin: 0 !important;
    white-space: nowrap;
}

.sign-pdf-signature-size-control input[type="range"] {
    min-width: 80px;
    margin: 0;
    flex: 1;
}

.sign-pdf-signature-size-control output {
    min-width: 37px;
    color: #566b85;
    font-size: 12px;
}

.sign-pdf-signature-options label,
.sign-pdf-text-options label {
    margin: 0;
}

.sign-pdf-signature-options > input[type="color"],
.sign-pdf-text-options input[type="color"] {
    width: 38px;
    height: 33px;
    padding: 2px;
    border: 1px solid #bfcddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.sign-pdf-signature-options input[type="range"],
.sign-pdf-text-options input[type="range"] {
    width: 100%;
    accent-color: var(--sign-primary);
}

.sign-pdf-signature-options output,
.sign-pdf-text-options output {
    min-width: 39px;
    color: #566b85;
    font-size: 12px;
}

.sign-pdf-modal-footer {
    border-top: 1px solid var(--sign-border);
    justify-content: flex-end;
}

@media (max-width: 991.98px) {
    .sign-pdf-card {
        padding: 25px 20px;
    }

    .sign-pdf-editor-shell {
        grid-template-columns: 145px minmax(0, 1fr);
    }

    .sign-pdf-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .sign-pdf-tool-group-actions {
        justify-content: flex-end;
    }

    .sign-pdf-selection-tools {
        flex-wrap: wrap;
    }

    .sign-pdf-selection-tools > span {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .sign-pdf-page {
        padding-top: 12px;
    }

    .sign-pdf-card {
        padding: 19px 12px;
        border-radius: 14px;
    }

    .sign-pdf-intro p {
        font-size: 14px;
    }

    .sign-pdf-upload {
        min-height: 266px;
        padding: 30px 16px;
    }

    .sign-pdf-file-status {
        display: grid;
        align-items: start;
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    .sign-pdf-file-info {
        width: 100%;
    }

    .sign-pdf-file-complete {
        margin-left: 49px;
    }

    .sign-pdf-new-file {
        width: 100%;
    }

    .sign-pdf-editor-shell {
        display: flex;
        height: auto;
        min-height: 0;
        max-height: none;
        flex-direction: column;
    }

    .sign-pdf-thumbnails {
        padding: 10px;
        border-right: 0;
        border-bottom: 1px solid var(--sign-border);
    }

    .sign-pdf-thumbnail-list {
        display: flex;
        overflow-x: auto;
        padding: 2px 1px 4px;
        gap: 8px;
    }

    .sign-pdf-thumbnail {
        width: 83px;
        min-width: 83px;
    }

    .sign-pdf-toolbar {
        min-height: 0;
        padding: 9px;
        gap: 7px;
    }

    .sign-pdf-tool-group-main {
        width: 100%;
    }

    .sign-pdf-tool {
        min-height: 38px;
        padding: 6px 8px;
        font-size: 11px;
    }

    .sign-pdf-tool-group-actions {
        width: 100%;
        justify-content: space-between;
    }

    .sign-pdf-selection-tools {
        padding: 9px;
        gap: 7px;
    }

    .sign-pdf-selection-tools > label {
        margin-left: 0;
    }

    .sign-pdf-selection-tools input[type="range"] {
        flex: 1;
        width: auto;
        min-width: 90px;
    }

    .sign-pdf-viewer {
        min-height: 355px;
        padding: 16px 10px;
        justify-content: flex-start;
    }

    .sign-pdf-page-navigation {
        padding: 9px;
    }

    .sign-pdf-page-navigation .btn {
        min-width: 0;
        padding-right: 9px;
        padding-left: 9px;
    }

    .sign-pdf-page-navigation span {
        min-width: 80px;
        font-size: 12px;
    }

    .sign-pdf-download-actions {
        flex-direction: column-reverse;
    }

    .sign-pdf-download-actions .btn,
    .sign-pdf-download-actions #sign-pdf-download {
        width: 100%;
    }

    .sign-pdf-signature-options,
    .sign-pdf-text-options {
        grid-template-columns: auto 44px 1fr auto;
    }

    /* Keep the legacy signature color/size controls on one line too. */
    .sign-pdf-signature-options {
        grid-template-columns: auto 44px auto minmax(80px, 1fr) auto;
    }

    .sign-pdf-signature-options label:nth-of-type(2),
    .sign-pdf-text-options label:nth-of-type(2) {
        grid-column: 1;
    }

    .sign-pdf-signature-options label:nth-of-type(2) {
        grid-column: auto;
    }

    .sign-pdf-signature-options input[type="range"],
    .sign-pdf-text-options input[type="range"] {
        grid-column: 2 / 4;
    }

    .sign-pdf-signature-options input[type="range"] {
        grid-column: auto;
    }

    .sign-pdf-signature-options output {
        align-self: center;
        grid-column: auto;
        white-space: nowrap;
    }
}

@media (max-width: 390px) {
    .sign-pdf-toolbar-divider {
        display: none;
    }

    .sign-pdf-page-navigation .btn span {
        display: none;
    }

    .sign-pdf-page-navigation .btn {
        min-width: 42px;
    }
}

@media (max-width: 767.98px) {
    #sign-pdf-signature-modal .sign-pdf-modal-dialog {
        height: min(680px, calc(100dvh - 16px));
        max-height: calc(100dvh - 16px);
    }

    #sign-pdf-signature-modal .sign-pdf-modal-header,
    #sign-pdf-signature-modal .sign-pdf-signature-tabs,
    #sign-pdf-signature-modal .sign-pdf-modal-footer {
        flex: 0 0 auto;
    }

    .sign-pdf-signature-tabs {
        margin: 16px 16px 0;
    }

    .sign-pdf-signature-tabs button {
        min-height: 57px;
        padding: 7px 5px;
        font-size: 11px;
    }

    #sign-pdf-signature-modal .sign-pdf-modal-body {
        min-height: 0;
        padding: 16px;
        flex: 1 1 auto;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .sign-pdf-signature-font-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .sign-pdf-font-choice {
        min-height: 48px;
        padding: 5px;
    }

    .sign-pdf-font-choice span {
        font-size: 17px;
    }

    .sign-pdf-font-choice[data-signature-font-choice="great-vibes"] span,
    .sign-pdf-font-choice[data-signature-font-choice="allura"] span,
    .sign-pdf-font-choice[data-signature-font-choice="alex-brush"] span {
        font-size: 21px;
    }

    .sign-pdf-font-choice[data-signature-font-choice="dancing-script"] span {
        font-size: 19px;
    }

    .sign-pdf-signature-options {
        align-items: stretch;
        flex-direction: column;
        gap: 17px;
    }

    .sign-pdf-signature-size-control {
        width: 100%;
        min-width: 0;
        flex: 0 0 auto;
    }
}
