/* rtl: * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
} */

body {
    background-color: #f5f5f5;
    color: #333;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step:hover .step-number {
    transform: scale(1.05);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 10px;
    color: white;
    transition: all 0.3s ease;
}

.step-inactive .step-number {
    background-color: #ccc;
}

.step-active .step-number {
    background-color: #fbaf3d;
}

.step-completed .step-number {
    background-color: #fbaf3d;
}

.step-title {
    font-size: 14px;
    text-align: center;
}

.progress-bar {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #eee;
    z-index: 1;
}

.progress-completed {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 0%;
    background-color: #fbaf3d;
    transition: width 0.5s ease;
}

.instruction {
    text-align: center;
    padding: 15px;
    background-color: #f9f9f9;
}

.action-button-container {
    text-align: center;
    padding: 15px;
    background-color: #f9f9f9;
    z-index: 10;
    position: relative;
}

.action-button {
    background-color: #fbaf3d;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.action-button:hover {
    background-color: #e99c2a;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.action-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pdf-viewer {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #e6e6e6;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
}

.pdf-toolbar {
    display: flex;
    align-items: center;
    padding: 8px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
    width: 100%;
    z-index: 5;
}

.pdf-toolbar button,
.pdf-toolbar select {
    background-color: transparent;
    border: none;
    padding: 5px 10px;
    margin: 0 2px;
    cursor: pointer;
    border-radius: 3px;
}

.pdf-toolbar button:hover {
    background-color: #e0e0e0;
}

.pdf-toolbar .spacer {
    flex: 1;
}

.pdf-content {
    position: absolute;
    top: 0px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto;
    background-color: #e6e6e6;
}

.pdf-embed {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}

.step-view {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
}

.step-view.active {
    display: flex;
    flex-direction: column;
}

.signature-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: white;

}

.signature-pad {
    border: 2px solid #ccc;
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    height: 200px;
    margin: 20px auto;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    touch-action: none;
}

.signature-pad canvas {
    width: 100% !important;
    height: 100% !important;
    border-radius: 6px;
    touch-action: none;
    cursor: crosshair;
}

.signature-actions {
    display: flex;
    gap: 1rem;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.signed-document-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.signature-stamp {
    position: absolute;
    top: 10px;
    right: 20px;
    background-color: rgba(251, 175, 61, 0.1);
    border: 2px solid #fbaf3d;
    padding: 10px 20px;
    border-radius: 8px;
    color: #fbaf3d;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
}

.signature-date {
    font-size: 12px;
    margin-top: 5px;
    color: #666;
}

@media (max-width: 768px) {
    .progress-bar {
        top: 25px;
    }

    .signature-pad {
        height: 150px;
    }
}

.success-message {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fbaf3d;
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    z-index: 100;
}

.step-views {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}



.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #fbaf3d;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-container p {
    font-size: 16px;
    color: #666;
}

#pdf-viewer {
    display: none;
    /* Ocultar el PDF hasta que esté listo */
}





/* Estilos personalizados para el área de firma */
.signature-pad {
    border: 2px solid #ccc;
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    height: 200px;
    margin: 20px auto;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    touch-action: none;
}

/* Estilos para el botón de limpiar firma */
.black-new-design,
.white-new-design {
    background-color: #000;
    color: #fff;
    border: 2px solid #000;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 120px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    max-width: 200px;
}

.black-new-design:hover {
    background-color: #fff;
    color: #000;
    border-color: #000;
}

.white-new-design {
    background-color: #fff;
    color: #000;
}

.white-new-design:hover {
    background-color: #000;
    color: #fff;
}

#clear-signature {
    margin: 0px;
    cursor: pointer;
}




.steps-container {
    display: flex;
    flex-direction: row-reverse;
    /* Invierte el orden de los pasos */
}


.step-view-2 {
    height: 100vh;
    /* Altura completa de la ventana */
    overflow-y: auto;
    /* Habilitar scroll vertical */
    scroll-behavior: smooth;
    /* Scroll suave */
}

/* Mobile optimization for step-view-2 */
@media (max-width: 768px) {
    .step-view-2 {
        height: auto !important;
        min-height: auto !important;
        overflow-y: visible !important;
        padding-bottom: 20px;
    }

    .step-view-2 .container {
        padding-left: 4px !important;
        padding-right: 4px !important;
        padding-bottom: 30px !important;
        overflow: visible !important;
        height: auto !important;
    }

    .step-view-2 .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .step-view-2 .col-md-6 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100%;
        flex: 0 0 100%;
    }
}

@media (max-width: 480px) {
    .step-view-2 .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-bottom: 30px !important;
        height: auto !important;
    }

    .step-view-2 .data-container,
    .step-view-2 .signature-container {
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0 !important;
    }

    .step-view-2 .prefilled-notice {
        padding: 10px !important;
        font-size: 12px !important;
        margin-bottom: 10px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0 !important;
    }
}

.container {
    height: 100%;
    /* Asegurar que el contenedor ocupe toda la altura */
}

.data-container,
.signature-container {
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    margin-bottom: 20px;
}

.signature-pad {
    border: 2px solid #ccc;
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    height: 200px;
    margin: 20px auto;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    touch-action: none;
}



#globalToast.toast {
    z-index: 9999;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.gap-3 {
    gap: 1rem;
}

.welcome-message {
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.welcome-title {
    font-size: 32px;
    margin-bottom: 20px;
}

.welcome-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.decoration-line {
    color: #666;
    margin: 0 10px;
}

.decoration-text {
    color: #333;
    font-size: 18px;
}

.welcome-content {
    font-size: 16px;
    line-height: 1.6;
}

.welcome-content p {
    margin-bottom: 10px;
}

.welcome-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.welcome-header {
    margin-bottom: 2rem;
}

.logo-container {
    margin-bottom: 1.5rem;
}

.welcome-logo {
    max-width: 150px;
    height: auto;
}

.welcome-title {
    color: #ff9933;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.welcome-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    gap: 1rem;
}

.decoration-line {
    height: 2px;
    flex: 1;
    background: linear-gradient(to right, transparent, #ff9933, transparent);
    max-width: 100px;
}

.decoration-text {
    font-size: 1.2rem;
    color: #666;
    padding: 0 1rem;
}

.message-box {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
}

.success-message {
    color: #28a745;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.success-message i {
    font-size: 1.5rem;
}

.content-text {
    text-align: right;
    direction: rtl;
    line-height: 1.6;
}

.highlight {
    color: #ff9933;
    font-weight: 500;
}

.contact-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.support-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #0099cc;
    text-decoration: none;
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background: rgba(0, 153, 204, 0.1);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.support-email:hover {
    background: rgba(0, 153, 204, 0.2);
    text-decoration: none;
}

.signature {
    margin-top: 2rem;
    text-align: right;
}

.signature span {
    display: block;
    margin-bottom: 0.5rem;
}

.welcome-action-button {
    background-color: #ff9933;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
}

.welcome-action-button:hover {
    background-color: #ff8800;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 153, 51, 0.3);
}

.button-text {
    font-weight: 500;
}


/* Overlay para loading global */
#global-loading-overlay {
    display: none;
    /* Se muestra con JS */
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s;
}

/* Spinner central */
.global-loading-spinner {
    width: 64px;
    height: 64px;
    border: 8px solid #e0e0e0;
    border-top: 8px solid #009688;
    border-radius: 50%;
    animation: global-spin 1s linear infinite;
    box-shadow: 0 0 16px #00968844;
}

@keyframes global-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}



/* Toast container */
#custom-toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

/* Toast base */
.custom-toast {
    min-width: 260px;
    max-width: 350px;
    background: #fff;
    color: #222;
    border-radius: 8px;
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.13), 0 1.5px 4px 0 rgba(0, 0, 0, 0.10);
    padding: 1rem 1.5rem 1rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border-left: 6px solid #007bff;
    opacity: 0;
    transform: translateY(-30px) scale(0.98);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: auto;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

/* Animación de entrada/salida */
.custom-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.custom-toast.hide {
    opacity: 0;
    transform: translateY(-30px) scale(0.98);
    transition: opacity 0.3s, transform 0.3s;
}

/* Tipos de toast */
.custom-toast.success {
    border-left-color: #28a745;
}

.custom-toast.error {
    border-left-color: #dc3545;
}

.custom-toast.warning {
    border-left-color: #ffc107;
}

.custom-toast.info {
    border-left-color: #17a2b8;
}

/* Título */
.custom-toast .toast-title {
    font-weight: bold;
    margin-bottom: 0.25em;
    font-size: 1.08em;
}

/* Botón de cierre */
.custom-toast .close-toast-btn {
    position: absolute;
    top: 0.5em;
    right: 0.7em;
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.3em;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    z-index: 2;
    transition: color 0.2s;
    pointer-events: auto;
}

.custom-toast .close-toast-btn:hover {
    color: #222;
}

/* Mensaje */
.custom-toast>div:not(.toast-title) {
    margin-bottom: 0.2em;
    word-break: break-word;
}

/* Responsive */
@media (max-width: 600px) {
    #custom-toast-container {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        align-items: flex-end;
    }

    .custom-toast {
        min-width: 180px;
        max-width: 98vw;
        font-size: 0.98em;
        padding: 0.8rem 1rem 0.8rem 0.8rem;
    }
}

/* ========================================
   COMPLIANCE CHECKBOXES STYLES
   ======================================== */
.compliance-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    margin: 10px auto;
    max-width: 600px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.compliance-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.compliance-header-text {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.compliance-header-status {
    font-size: 13px;
    font-weight: 600;
    color: #fbaf3d;
    padding: 2px 8px;
    background: #fff8ed;
    border-radius: 12px;
}

.compliance-toggle-icon {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
}

.compliance-container.collapsed .compliance-toggle-icon {
    transform: rotate(180deg);
}

.compliance-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.compliance-item {
    display: flex;
    align-items: center;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.compliance-item:hover {
    background: #f5f5f5;
    border-color: #fbaf3d;
}

.compliance-item.checked {
    background: #fff8ed;
    border-color: #fbaf3d;
}

.compliance-item.optional {
    background: #f8f8f8;
    border-style: dashed;
    border-color: #ddd;
}

.compliance-item.optional.checked {
    background: #f0f7ff;
    border-color: #4a9eff;
    border-style: solid;
}

.compliance-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    position: relative;
    margin: 0;
    width: 100%;
    font-size: 14px;
    line-height: 1.4;
    flex-direction: row-reverse;
}

.compliance-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.compliance-checkbox .checkmark {
    position: relative;
    flex-shrink: 0;
    height: 22px;
    width: 22px;
    min-width: 22px;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 5px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compliance-checkbox:hover .checkmark {
    border-color: #fbaf3d;
}

.compliance-checkbox input:checked~.checkmark {
    background-color: #fbaf3d;
    border-color: #fbaf3d;
}

.compliance-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.compliance-checkbox input:checked~.checkmark:after {
    display: block;
}

.compliance-text {
    flex: 1;
    color: #444;
    text-align: right;
    user-select: none;
    font-size: 13px;
}

.compliance-link {
    color: #fbaf3d;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.compliance-link:hover {
    color: #e09a2a;
}

.compliance-error {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
    padding: 10px 15px;
    background: #fff5f5;
    border: 1px solid #ffcccc;
    border-radius: 6px;
    color: #dc3545;
    font-size: 13px;
    font-weight: 500;
}

.compliance-error i {
    font-size: 16px;
}

/* RTL Support for Hebrew */
[dir="rtl"] .compliance-checkbox,
.compliance-checkbox {
    flex-direction: row-reverse;
}

[dir="rtl"] .compliance-text,
.compliance-text {
    text-align: right;
}

[dir="rtl"] .compliance-checkbox .checkmark:after,
.compliance-checkbox .checkmark:after {
    left: 7px;
}

/* Animation for checkbox */
@keyframes checkmark-pop {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.compliance-checkbox input:checked~.checkmark {
    animation: checkmark-pop 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .compliance-container {
        margin: 8px 15px;
        padding: 12px;
        max-width: 100%;
    }

    .compliance-header {
        display: flex;
    }

    .compliance-wrapper {
        gap: 5px;
    }

    .compliance-item {
        padding: 8px 10px;
    }

    .compliance-checkbox {
        font-size: 12px;
        gap: 8px;
    }

    .compliance-checkbox .checkmark {
        height: 18px;
        width: 18px;
        min-width: 18px;
    }

    .compliance-checkbox .checkmark:after {
        left: 5px;
        top: 1px;
        width: 4px;
        height: 9px;
    }

    .compliance-text {
        font-size: 11px;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .compliance-container {
        margin: 8px 10px;
        padding: 10px;
        border-radius: 8px;
    }

    .compliance-wrapper {
        gap: 4px;
    }

    .compliance-item {
        padding: 8px 10px;
        border-radius: 6px;
    }

    .compliance-checkbox {
        font-size: 11px;
        gap: 8px;
    }

    .compliance-checkbox .checkmark {
        height: 18px;
        width: 18px;
        min-width: 18px;
    }

    .compliance-checkbox .checkmark:after {
        left: 4px;
        top: 1px;
        width: 4px;
        height: 8px;
    }

    .compliance-text {
        font-size: 11px;
        line-height: 1.3;
    }

    .compliance-error {
        font-size: 10px;
        padding: 6px 8px;
    }

    /* Compact mode for mobile - 2 columns layout */
    .compliance-wrapper.compact-mode {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .compliance-wrapper.compact-mode .compliance-item {
        padding: 6px 8px;
    }

    .compliance-wrapper.compact-mode .compliance-text {
        font-size: 10px;
        line-height: 1.2;
    }

    .compliance-wrapper.compact-mode .compliance-checkbox .checkmark {
        height: 16px;
        width: 16px;
        min-width: 16px;
    }
}

/* ========================================
   MOBILE PDF VIEWER OPTIMIZATION
   ======================================== */
@media (max-width: 768px) {

    /* When compliance is collapsed, give more space to PDF */
    .compliance-container.collapsed {
        padding: 8px 12px;
        margin: 5px 15px;
    }

    .compliance-container.collapsed .compliance-header {
        margin-bottom: 0;
        border-bottom: none;
        padding: 4px 0;
    }

    /* Improve PDF viewer height on mobile */
    .step-view-1 .pdf-viewer {
        min-height: 50vh;
    }

    /* Reduce instruction padding on mobile */
    .instruction {
        padding: 8px 15px;
        margin: 5px 0;
    }

    .instruction p {
        font-size: 13px;
        margin: 0;
    }

    /* Reduce action button container padding */
    .action-button-container {
        padding: 8px 15px;
    }

    .action-button {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .step-view-1 .pdf-viewer {
        min-height: 45vh;
    }

    .compliance-header-text {
        font-size: 12px;
    }

    .compliance-header-status {
        font-size: 11px;
        padding: 2px 6px;
    }

    .instruction p {
        font-size: 12px;
    }
}

/* ========================================
   MOBILE OPTIMIZATION - STEP 2 FORM
   ======================================== */
@media (max-width: 768px) {
    body {
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh;
    }

    .step-views {
        overflow: visible !important;
        height: auto !important;
        min-height: 0;
    }

    .step-view {
        height: auto !important;
    }

    .steps-container {
        padding: 10px 4px;
        gap: 0;
    }

    .step {
        flex: 1 1 25%;
        max-width: 25%;
        min-width: 0;
    }

    .step-number {
        width: 30px;
        height: 30px;
        margin-bottom: 4px;
        font-size: 13px;
    }

    .step-title {
        font-size: 10px;
        line-height: 1.2;
        word-break: break-word;
        hyphens: auto;
        padding: 0 2px;
    }

    .data-container,
    .signature-container {
        padding: 12px;
        padding-bottom: 20px;
        margin-bottom: 12px;
        border-radius: 8px;
        overflow: visible;
    }

    .signature-pad {
        margin: 12px auto;
        height: 160px;
    }

    .signature-actions {
        margin-top: 12px;
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .black-new-design,
    .white-new-design {
        min-width: 120px;
        height: 44px;
        padding: 10px 16px;
        font-size: 14px;
    }

    .signature-container .action-button {
        width: 100%;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .steps-container {
        padding: 8px 2px;
        gap: 0;
    }

    .step {
        flex: 1 1 25%;
        max-width: 25%;
        min-width: 0;
    }

    .step-number {
        width: 26px;
        height: 26px;
        margin-bottom: 3px;
        font-size: 11px;
    }

    .step-title {
        font-size: 9px;
        line-height: 1.15;
        word-break: break-word;
        hyphens: auto;
        padding: 0 1px;
    }

    .data-container,
    .signature-container {
        padding: 10px 8px;
        padding-bottom: 20px;
        margin-bottom: 10px;
        border-radius: 6px;
        overflow: visible;
    }

    .signature-pad {
        margin: 10px auto;
        height: 140px;
        border-radius: 6px;
    }

    .signature-actions {
        margin-top: 10px;
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        display: flex !important;
        visibility: visible !important;
    }

    .signature-actions button {
        padding: 10px 16px;
        font-size: 13px;
        flex: 1 1 auto;
        min-width: 100px;
        display: inline-flex !important;
        visibility: visible !important;
    }

    .black-new-design,
    .white-new-design {
        min-width: 100px !important;
        height: 42px !important;
        padding: 8px 12px !important;
        font-size: 13px !important;
        display: inline-flex !important;
    }

    .signature-container .action-button {
        width: 100%;
        margin-top: 8px;
        display: block !important;
    }

    .instruction {
        padding: 6px 10px;
    }

    .action-button-container {
        padding: 6px 10px;
    }

    .action-button {
        padding: 10px 16px;
        font-size: 13px;
    }

    /* Form fields optimization */
    .form-control,
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px 10px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
    }

    .form-group label {
        font-size: 12px !important;
        margin-bottom: 4px !important;
    }

    .form-group {
        margin-bottom: 10px !important;
    }
}